]> git.pld-linux.org Git - packages/audit.git/blame - audit.spec
- updated to 2.4.1
[packages/audit.git] / audit.spec
CommitLineData
ce14e998 1#
e5a8c0d8 2# Conditional build:
49caa03e 3%bcond_without kerberos5 # Kerberos V support via heimdal
ffa39469 4%bcond_without prelude # prelude audisp plugin
49caa03e
JB
5%bcond_without golang # Go language bindings
6%bcond_without python # Python bindings
7%bcond_without zos_remote # zos-remote audisp plugin (LDAP dep)
e5a8c0d8 8#
54697230 9Summary: User space tools for 2.6 kernel auditing
7f0a1e1e 10Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6
54697230 11Name: audit
0b094d2d
JB
12Version: 2.4.1
13Release: 1
ab8f94cb 14License: GPL v2+
54697230
JB
15Group: Daemons
16Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
0b094d2d 17# Source0-md5: 03a73041e2de853148b2bca67a1d9138
de2a21fd
JB
18Source2: %{name}d.init
19Source3: %{name}d.sysconfig
80475ae6 20Patch0: %{name}-install.patch
b0722891 21Patch1: %{name}-m4.patch
61d763d9 22Patch2: %{name}-nolibs.patch
220b3c30 23Patch3: %{name}-no_zos_remote.patch
ffa39469 24Patch4: %{name}-systemd-notonly.patch
0bd7ba4a 25Patch5: %{name}-am.patch
738da8d6
JR
26Patch6: %{name}-no-refusemanualstop.patch
27Patch7: %{name}-cronjob.patch
23c6312b 28Patch8: golang-paths.patch
54697230
JB
29URL: http://people.redhat.com/sgrubb/audit/
30BuildRequires: autoconf >= 2.59
10583781 31BuildRequires: automake >= 1:1.9
10583781 32BuildRequires: glibc-headers >= 6:2.3.6
49caa03e 33%{?with_golang:BuildRequires: golang}
220b3c30 34%{?with_kerberos5:BuildRequires: heimdal-devel}
693afa1c 35BuildRequires: libcap-ng-devel
526a1f46 36%{?with_prelude:BuildRequires: libprelude-devel}
54697230 37BuildRequires: libtool
61d763d9 38BuildRequires: libwrap-devel
d80f3483 39BuildRequires: linux-libc-headers >= 7:2.6.30
220b3c30 40%{?with_zos_remote:BuildRequires: openldap-devel}
57f09668 41%if %{with python}
84214962 42BuildRequires: python-devel >= 1:2.5
9ee6c1ce 43BuildRequires: rpm-pythonprov
7e695d35 44BuildRequires: swig-python
57f09668 45%endif
9a3b9076 46BuildRequires: rpmbuild(macros) >= 1.623
ab8f94cb 47BuildRequires: sed >= 4.0
54697230 48Requires(post,preun): /sbin/chkconfig
195529ba 49Requires(post,preun,postun): systemd-units >= 38
54697230 50Requires: %{name}-libs = %{version}-%{release}
96102055 51Requires: rc-scripts
195529ba 52Requires: systemd-units >= 38
526a1f46 53Obsoletes: audit-audispd-plugins
7ede5762 54Obsoletes: audit-systemd
54697230
JB
55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57%define _sbindir /sbin
ab8f94cb
JB
58# use /lib, because this path is put in /usr/share/.../settings.py
59%define _libexecdir %{_prefix}/lib
54697230
JB
60
61%description
62The audit package contains the user space utilities for storing and
63processing the audit records generate by the audit subsystem in the
64Linux 2.6 kernel.
65
b27e8f95
JR
66%description -l pl.UTF-8
67Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania
68i przetwarzania rekordów audytu generowanych przez podsystem audytu w
69jądrach Linuksa 2.6.
54697230
JB
70
71%package libs
5a56b716 72Summary: Dynamic audit libraries
7f0a1e1e 73Summary(pl.UTF-8): Biblioteki dynamiczne audit
ab8f94cb 74License: LGPL v2.1+
54697230
JB
75Group: Libraries
76
77%description libs
5a56b716 78The audit-libs package contains the dynamic libraries needed for
54697230
JB
79applications to use the audit framework.
80
b27e8f95 81%description libs -l pl.UTF-8
5a56b716 82Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji
b27e8f95 83używających środowiska audytu.
54697230
JB
84
85%package libs-devel
5a56b716 86Summary: Header files for audit libraries
7f0a1e1e 87Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit
ab8f94cb 88License: LGPL v2.1+
54697230
JB
89Group: Development/Libraries
90Requires: %{name}-libs = %{version}-%{release}
d80f3483 91Requires: linux-libc-headers >= 7:2.6.30
54697230
JB
92
93%description libs-devel
94The audit-libs-devel package contains the header files needed for
95developing applications that need to use the audit framework library.
96
b27e8f95
JR
97%description libs-devel -l pl.UTF-8
98Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji
99używających biblioteki środowiska audytu.
54697230
JB
100
101%package libs-static
5a56b716 102Summary: Static audit libraries
7f0a1e1e 103Summary(pl.UTF-8): Statyczne biblioteki audit
ab8f94cb 104License: LGPL v2.1+
54697230
JB
105Group: Development/Libraries
106Requires: %{name}-libs-devel = %{version}-%{release}
107
108%description libs-static
5a56b716
JB
109The audit-libs-static package contains the static libraries for
110developing applications that need to use the audit framework.
54697230 111
b27e8f95 112%description libs-static -l pl.UTF-8
5a56b716 113Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji
b27e8f95 114używających środowiska audytu.
54697230 115
526a1f46
JB
116%package plugin-prelude
117Summary: prelude plugin for audispd
118Summary(pl.UTF-8): Wtyczka prelude dla audispd
119Group: Daemons
120Requires: %{name} = %{version}-%{release}
121
122%description plugin-prelude
123audisp-prelude is a plugin for the audit event dispatcher daemon,
124audispd, that uses libprelude to send IDMEF alerts for possible
125Intrusion Detection events.
126
127%description plugin-prelude -l pl.UTF-8
128audisp-prelude to wtyczka demona audispd przekazującego zdarzenia
129audytowe wykorzystująca libprelude do wysyłania alarmów IDMEF o
130prawdopodobnych zdarzeniach IDS.
131
49caa03e
JB
132%package -n golang-audit
133Summary: Go language interface to libaudit library
134Summary(pl.UTF-8): Interfejs języka Go do biblioteki libaudit
135License: LGPL v2.1+
136Group: Development/Languages
137Requires: %{name}-libs = %{version}-%{release}
138Requires: golang
139
140%description -n golang-audit
141Go language interface to libaudit library.
142
143%description -n golang-audit -l pl.UTF-8
144Interfejs języka Go do biblioteki libaudit.
145
9ee6c1ce
JB
146%package -n python-audit
147Summary: Python interface to libaudit library
7f0a1e1e 148Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit
ab8f94cb 149License: LGPL v2.1+
9ee6c1ce
JB
150Group: Libraries/Python
151Requires: %{name}-libs = %{version}-%{release}
152
153%description -n python-audit
154Python interface to libaudit library.
155
b27e8f95 156%description -n python-audit -l pl.UTF-8
9ee6c1ce
JB
157Pythonowy interfejs do biblioteki libaudit.
158
54697230
JB
159%prep
160%setup -q
eb9b3ab9 161%patch0 -p1
1e78f2d9 162%patch1 -p1
61d763d9 163%patch2 -p1
220b3c30 164%{!?with_zos_remote:%patch3 -p1}
ffa39469 165%patch4 -p1
0bd7ba4a 166%patch5 -p1
738da8d6
JR
167%patch6 -p1
168%patch7 -p1
23c6312b 169%patch8 -p1
1a8b063a 170
68d62ac9 171%if %{without python}
b89f6d79 172sed 's#swig/Makefile ##' -i configure.ac
9d3991e5 173sed 's/swig//' -i Makefile.am
57f09668 174%endif
175
54697230
JB
176%build
177%{__libtoolize}
178%{__aclocal}
179%{__autoconf}
180%{__autoheader}
181%{__automake}
cc094a3e 182%configure \
220b3c30 183 %{?with_kerberos5:--enable-gssapi-krb5} \
ffa39469 184 --enable-systemd \
61d763d9
JB
185 --with-apparmor \
186 --with-libwrap \
526a1f46 187 %{?with_prelude:--with-prelude}
54697230 188
738da8d6 189%{__make}
bf2e6acc 190
54697230
JB
191%install
192rm -rf $RPM_BUILD_ROOT
193install -d $RPM_BUILD_ROOT%{_var}/log/audit
194
195%{__make} install \
196 DESTDIR=$RPM_BUILD_ROOT
197
738da8d6
JR
198install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
199install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
bf2e6acc 200
54697230
JB
201install -d $RPM_BUILD_ROOT/%{_lib}
202mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
fef538cf 203ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \
1a8b063a 204 $RPM_BUILD_ROOT%{_libdir}/libaudit.so
8ba70267 205mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib}
fef538cf 206ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \
8ba70267 207 $RPM_BUILD_ROOT%{_libdir}/libauparse.so
54697230 208
738da8d6
JR
209# RH initscripts-specific
210%{__rm} -r $RPM_BUILD_ROOT%{_libexecdir}/initscripts
6c98eb8c 211
57f09668 212%if %{with python}
68d62ac9
JB
213%py_comp $RPM_BUILD_ROOT%{py_sitedir}
214%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
738da8d6 215%py_postclean
68d62ac9 216%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
57f09668 217%endif
9ee6c1ce 218
54697230
JB
219%clean
220rm -rf $RPM_BUILD_ROOT
221
222%post libs -p /sbin/ldconfig
223%postun libs -p /sbin/ldconfig
224
225%post
738da8d6
JR
226# Copy default rules into place on new installation
227if [ ! -e %{_sysconfdir}/audit/audit.rules ] ; then
228 cp -a %{_sysconfdir}/audit/rules.d/audit.rules %{_sysconfdir}/audit/audit.rules
229fi
54697230 230/sbin/chkconfig --add auditd
2a6b8c9c 231%service auditd restart "audit daemon"
7ede5762 232%systemd_post auditd.service
54697230
JB
233
234%preun
235if [ "$1" = "0" ]; then
2a6b8c9c 236 %service auditd stop
54697230
JB
237 /sbin/chkconfig --del auditd
238fi
9a3b9076
BZ
239%systemd_preun auditd.service
240
7ede5762
JR
241%postun
242%systemd_reload
243
244%triggerpostun -- %{name} < 2.2-2
245%systemd_trigger auditd.service
9a3b9076 246
738da8d6
JR
247%triggerpostun -- %{name} < 2.3-1
248if [ -e %{_sysconfdir}/audit/audit.rules.rpmsave ] ; then
249 %{__mv} %{_sysconfdir}/audit/audit.rules{.rpmsave,}
250fi
f5eaf0b6
JR
251%service auditd restart "audit daemon"
252%systemd_post auditd.service
738da8d6 253
54697230
JB
254%files
255%defattr(644,root,root,755)
bd0730be 256%doc AUTHORS ChangeLog README THANKS TODO
738da8d6 257%doc contrib/{capp,nispom,lspp,stig}.rules init.d/auditd.cron
2bfdaebd 258%attr(750,root,root) %{_bindir}/aulast
08b12da9
JB
259%attr(750,root,root) %{_bindir}/aulastlog
260%attr(750,root,root) %{_bindir}/ausyscall
d80f3483 261%attr(750,root,root) %{_bindir}/auvirt
80475ae6 262%attr(750,root,root) %{_sbindir}/audispd
54697230
JB
263%attr(750,root,root) %{_sbindir}/auditctl
264%attr(750,root,root) %{_sbindir}/auditd
896d27e1 265%attr(750,root,root) %{_sbindir}/augenrules
e5a8c0d8 266%attr(750,root,root) %{_sbindir}/aureport
54697230
JB
267%attr(750,root,root) %{_sbindir}/ausearch
268%attr(750,root,root) %{_sbindir}/autrace
08b12da9 269%attr(755,root,root) %{_sbindir}/audisp-remote
ffa39469 270%{?with_zos_remote:%attr(755,root,root) %{_sbindir}/audispd-zos-remote}
0a348a92
JB
271%dir %{_sysconfdir}/audisp
272%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf
08b12da9 273%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf
ffa39469 274%{?with_zos_remote:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf}
0a348a92
JB
275%dir %{_sysconfdir}/audisp/plugins.d
276%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf
08b12da9 277%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf
ffa39469 278%{?with_zos_remote:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf}
0a348a92 279%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf
7630c8d3
JB
280%dir %{_sysconfdir}/audit
281%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
896d27e1
AZ
282%dir %{_sysconfdir}/audit/rules.d
283%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/rules.d/audit.rules
80475ae6 284%attr(754,root,root) /etc/rc.d/init.d/auditd
f6ae0a53 285%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
7ede5762 286%{systemdunitdir}/auditd.service
54697230 287%attr(750,root,root) %dir %{_var}/log/audit
0a348a92 288%{_mandir}/man5/audispd.conf.5*
08b12da9 289%{_mandir}/man5/audisp-remote.conf.5*
80475ae6 290%{_mandir}/man5/auditd.conf.5*
526a1f46 291%{_mandir}/man5/ausearch-expression.5*
ffa39469 292%{?with_zos_remote:%{_mandir}/man5/zos-remote.conf.5*}
693afa1c 293%{_mandir}/man7/audit.rules.7*
08b12da9 294%{_mandir}/man8/audisp-remote.8*
ffa39469 295%{?with_zos_remote:%{_mandir}/man8/audispd-zos-remote.8*}
526a1f46
JB
296%{_mandir}/man8/audispd.8*
297%{_mandir}/man8/auditctl.8*
298%{_mandir}/man8/auditd.8*
896d27e1 299%{_mandir}/man8/augenrules.8*
2bfdaebd 300%{_mandir}/man8/aulast.8*
526a1f46
JB
301%{_mandir}/man8/aulastlog.8*
302%{_mandir}/man8/aureport.8*
303%{_mandir}/man8/ausearch.8*
08b12da9 304%{_mandir}/man8/ausyscall.8*
526a1f46 305%{_mandir}/man8/autrace.8*
d80f3483 306%{_mandir}/man8/auvirt.8*
54697230
JB
307
308%files libs
309%defattr(644,root,root,755)
310%attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
82313177 311%attr(755,root,root) %ghost /%{_lib}/libaudit.so.1
8ba70267 312%attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
fef538cf 313%attr(755,root,root) %ghost /%{_lib}/libauparse.so.0
7630c8d3 314%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
693afa1c 315%{_mandir}/man5/libaudit.conf.5*
54697230
JB
316
317%files libs-devel
318%defattr(644,root,root,755)
319%attr(755,root,root) %{_libdir}/libaudit.so
8ba70267 320%attr(755,root,root) %{_libdir}/libauparse.so
54697230 321%{_libdir}/libaudit.la
8ba70267 322%{_libdir}/libauparse.la
6d3a6f20 323%{_includedir}/auparse*.h
54697230 324%{_includedir}/libaudit.h
49caa03e 325%{_pkgconfigdir}/audit.pc
526a1f46
JB
326%{_mandir}/man3/audit_*.3*
327%{_mandir}/man3/auparse_*.3*
328%{_mandir}/man3/ausearch_*.3*
329%{_mandir}/man3/get_auditfail_action.3*
330%{_mandir}/man3/set_aumessage_mode.3*
54697230
JB
331
332%files libs-static
333%defattr(644,root,root,755)
334%{_libdir}/libaudit.a
8ba70267 335%{_libdir}/libauparse.a
9ee6c1ce 336
526a1f46
JB
337%if %{with prelude}
338%files plugin-prelude
339%defattr(644,root,root,755)
340%attr(755,root,root) %{_sbindir}/audisp-prelude
341%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-prelude.conf
342%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-prelude.conf
343%{_mandir}/man5/audisp-prelude.conf.5*
344%{_mandir}/man8/audisp-prelude.8*
345%endif
346
49caa03e
JB
347%if %{with golang}
348%files -n golang-audit
349%defattr(644,root,root,755)
350%dir %{_libdir}/golang/src/pkg/redhat.com
351%{_libdir}/golang/src/pkg/redhat.com/audit
352%endif
353
57f09668 354%if %{with python}
9ee6c1ce
JB
355%files -n python-audit
356%defattr(644,root,root,755)
357%attr(755,root,root) %{py_sitedir}/_audit.so
84214962 358%attr(755,root,root) %{py_sitedir}/auparse.so
4c11c375 359%{py_sitedir}/audit.py[co]
57f09668 360%endif
This page took 0.129487 seconds and 4 git commands to generate.