]> git.pld-linux.org Git - packages/audit.git/blame - audit.spec
- full path in daemon()
[packages/audit.git] / audit.spec
CommitLineData
e5a8c0d8
JB
1#
2# Conditional build:
3%bcond_without pie # auditd as PIE binary
526a1f46 4%bcond_without prelude # prelude audisp plugin
57f09668 5%bcond_without python # don't build python bindings
e5a8c0d8 6#
54697230 7Summary: User space tools for 2.6 kernel auditing
7f0a1e1e 8Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6
54697230 9Name: audit
4c11c375 10Version: 1.7.13
d99cf09a 11Release: 4
ab8f94cb 12License: GPL v2+
54697230
JB
13Group: Daemons
14Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
4c11c375 15# Source0-md5: 967776cbec046043ef02ffefe0e89cb7
de2a21fd
JB
16Source2: %{name}d.init
17Source3: %{name}d.sysconfig
80475ae6 18Patch0: %{name}-install.patch
54697230
JB
19URL: http://people.redhat.com/sgrubb/audit/
20BuildRequires: autoconf >= 2.59
10583781 21BuildRequires: automake >= 1:1.9
e5a8c0d8 22%{?with_pie:BuildRequires: gcc >= 5:3.4}
0a348a92 23BuildRequires: gettext-devel >= 0.14.6
10583781 24BuildRequires: glibc-headers >= 6:2.3.6
5e4a6748 25BuildRequires: intltool
10583781 26BuildRequires: libstdc++-devel
526a1f46 27%{?with_prelude:BuildRequires: libprelude-devel}
54697230 28BuildRequires: libtool
80475ae6 29BuildRequires: linux-libc-headers >= 7:2.6.20
792ef7a1 30BuildRequires: openldap-devel
57f09668 31%if %{with python}
84214962 32BuildRequires: python-devel >= 1:2.5
9ee6c1ce 33BuildRequires: rpm-pythonprov
7e695d35 34BuildRequires: swig-python
57f09668 35%endif
36BuildRequires: rpmbuild(macros) >= 1.268
ab8f94cb 37BuildRequires: sed >= 4.0
54697230
JB
38Requires(post,preun): /sbin/chkconfig
39Requires: %{name}-libs = %{version}-%{release}
96102055 40Requires: rc-scripts
526a1f46 41Obsoletes: audit-audispd-plugins
54697230
JB
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%define _sbindir /sbin
ab8f94cb
JB
45# use /lib, because this path is put in /usr/share/.../settings.py
46%define _libexecdir %{_prefix}/lib
54697230
JB
47
48%description
49The audit package contains the user space utilities for storing and
50processing the audit records generate by the audit subsystem in the
51Linux 2.6 kernel.
52
b27e8f95
JR
53%description -l pl.UTF-8
54Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania
55i przetwarzania rekordów audytu generowanych przez podsystem audytu w
56jądrach Linuksa 2.6.
54697230
JB
57
58%package libs
5a56b716 59Summary: Dynamic audit libraries
7f0a1e1e 60Summary(pl.UTF-8): Biblioteki dynamiczne audit
ab8f94cb 61License: LGPL v2.1+
54697230
JB
62Group: Libraries
63
64%description libs
5a56b716 65The audit-libs package contains the dynamic libraries needed for
54697230
JB
66applications to use the audit framework.
67
b27e8f95 68%description libs -l pl.UTF-8
5a56b716 69Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji
b27e8f95 70używających środowiska audytu.
54697230
JB
71
72%package libs-devel
5a56b716 73Summary: Header files for audit libraries
7f0a1e1e 74Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit
ab8f94cb 75License: LGPL v2.1+
54697230
JB
76Group: Development/Libraries
77Requires: %{name}-libs = %{version}-%{release}
ab8f94cb 78Requires: linux-libc-headers >= 7:2.6.20
54697230
JB
79
80%description libs-devel
81The audit-libs-devel package contains the header files needed for
82developing applications that need to use the audit framework library.
83
b27e8f95
JR
84%description libs-devel -l pl.UTF-8
85Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji
86używających biblioteki środowiska audytu.
54697230
JB
87
88%package libs-static
5a56b716 89Summary: Static audit libraries
7f0a1e1e 90Summary(pl.UTF-8): Statyczne biblioteki audit
ab8f94cb 91License: LGPL v2.1+
54697230
JB
92Group: Development/Libraries
93Requires: %{name}-libs-devel = %{version}-%{release}
94
95%description libs-static
5a56b716
JB
96The audit-libs-static package contains the static libraries for
97developing applications that need to use the audit framework.
54697230 98
b27e8f95 99%description libs-static -l pl.UTF-8
5a56b716 100Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji
b27e8f95 101używających środowiska audytu.
54697230 102
526a1f46
JB
103%package plugin-prelude
104Summary: prelude plugin for audispd
105Summary(pl.UTF-8): Wtyczka prelude dla audispd
106Group: Daemons
107Requires: %{name} = %{version}-%{release}
108
109%description plugin-prelude
110audisp-prelude is a plugin for the audit event dispatcher daemon,
111audispd, that uses libprelude to send IDMEF alerts for possible
112Intrusion Detection events.
113
114%description plugin-prelude -l pl.UTF-8
115audisp-prelude to wtyczka demona audispd przekazującego zdarzenia
116audytowe wykorzystująca libprelude do wysyłania alarmów IDMEF o
117prawdopodobnych zdarzeniach IDS.
118
9ee6c1ce
JB
119%package -n python-audit
120Summary: Python interface to libaudit library
7f0a1e1e 121Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit
ab8f94cb 122License: LGPL v2.1+
9ee6c1ce
JB
123Group: Libraries/Python
124Requires: %{name}-libs = %{version}-%{release}
125
126%description -n python-audit
127Python interface to libaudit library.
128
b27e8f95 129%description -n python-audit -l pl.UTF-8
9ee6c1ce
JB
130Pythonowy interfejs do biblioteki libaudit.
131
ab8f94cb
JB
132%package -n system-config-audit
133Summary: Utility for editing audit configuration
134Summary(pl.UTF-8): Narzędzie do zmiany konfiguracji audytu
135License: GPL v2
136Group: Applications/System
137Requires: %{name} = %{version}-%{release}
df9476f1 138Version: 0.4.8
6fc26f9b 139Requires: python-pygtk-glade >= 2:2.0
ab8f94cb
JB
140Requires: usermode
141#Requires: usermode-gtk ???
142
143%description -n system-config-audit
144An utility for editing audit configuration.
145
146%description -n system-config-audit -l pl.UTF-8
147Narzędzie do zmiany konfiguracji audytu.
148
54697230
JB
149%prep
150%setup -q
eb9b3ab9 151%patch0 -p1
1a8b063a 152
3d5ad897 153%if !%{with python}
b89f6d79 154sed 's#swig/Makefile ##' -i configure.ac
9d3991e5 155sed 's/swig//' -i Makefile.am
57f09668 156%endif
157
ab8f94cb
JB
158sed -i -e 's,/main\.py,/main.pyc,' system-config-audit/src/system-config-audit.in
159
54697230
JB
160%build
161%{__libtoolize}
162%{__aclocal}
163%{__autoconf}
164%{__autoheader}
165%{__automake}
0a348a92 166cd system-config-audit
526a1f46 167%{__libtoolize}
0a348a92
JB
168%{__aclocal}
169%{__autoconf}
170%{__autoheader}
171%{__automake}
172cd ..
cc094a3e 173%configure \
526a1f46
JB
174 --with-apparmor \
175 %{?with_prelude:--with-prelude}
e5a8c0d8
JB
176# override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3
177%{__make} \
aac5fae1 178 %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"}
54697230 179
bf2e6acc
JB
180# temporarily not included in all
181%{__make} -C auparse
182
54697230
JB
183%install
184rm -rf $RPM_BUILD_ROOT
185install -d $RPM_BUILD_ROOT%{_var}/log/audit
186
187%{__make} install \
188 DESTDIR=$RPM_BUILD_ROOT
189
bf2e6acc
JB
190# temporarily not included in all
191%{__make} -C auparse install \
192 DESTDIR=$RPM_BUILD_ROOT
193
54697230
JB
194install -d $RPM_BUILD_ROOT/%{_lib}
195mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
fef538cf 196ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \
1a8b063a 197 $RPM_BUILD_ROOT%{_libdir}/libaudit.so
8ba70267 198mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib}
fef538cf 199ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \
8ba70267 200 $RPM_BUILD_ROOT%{_libdir}/libauparse.so
54697230
JB
201
202# We manually install this since Makefile doesn't
203install -d $RPM_BUILD_ROOT%{_includedir}
204install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
205
de2a21fd
JB
206install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
207install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
208
57f09668 209%if %{with python}
eb9b3ab9 210%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
8e99bb72 211%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
eb9b3ab9 212rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
8e99bb72 213rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
ab8f94cb
JB
214
215%py_postclean $RPM_BUILD_ROOT%{_datadir}/system-config-audit
216%find_lang system-config-audit
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
226/sbin/chkconfig --add auditd
2a6b8c9c 227%service auditd restart "audit daemon"
54697230
JB
228
229%preun
230if [ "$1" = "0" ]; then
2a6b8c9c 231 %service auditd stop
54697230
JB
232 /sbin/chkconfig --del auditd
233fi
234
235%files
236%defattr(644,root,root,755)
bd0730be 237%doc AUTHORS ChangeLog README THANKS TODO
2bfdaebd 238%attr(750,root,root) %{_bindir}/aulast
08b12da9
JB
239%attr(750,root,root) %{_bindir}/aulastlog
240%attr(750,root,root) %{_bindir}/ausyscall
80475ae6 241%attr(750,root,root) %{_sbindir}/audispd
54697230
JB
242%attr(750,root,root) %{_sbindir}/auditctl
243%attr(750,root,root) %{_sbindir}/auditd
e5a8c0d8 244%attr(750,root,root) %{_sbindir}/aureport
54697230
JB
245%attr(750,root,root) %{_sbindir}/ausearch
246%attr(750,root,root) %{_sbindir}/autrace
08b12da9 247%attr(755,root,root) %{_sbindir}/audisp-remote
2f4ad87a 248%attr(755,root,root) %{_sbindir}/audispd-zos-remote
0a348a92
JB
249%dir %{_sysconfdir}/audisp
250%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf
08b12da9 251%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf
2f4ad87a 252%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf
0a348a92
JB
253%dir %{_sysconfdir}/audisp/plugins.d
254%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf
08b12da9 255%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf
792ef7a1 256%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf
0a348a92 257%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf
7630c8d3
JB
258%dir %{_sysconfdir}/audit
259%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
260%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules
80475ae6 261%attr(754,root,root) /etc/rc.d/init.d/auditd
f6ae0a53 262%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
54697230 263%attr(750,root,root) %dir %{_var}/log/audit
0a348a92 264%{_mandir}/man5/audispd.conf.5*
08b12da9 265%{_mandir}/man5/audisp-remote.conf.5*
80475ae6 266%{_mandir}/man5/auditd.conf.5*
526a1f46 267%{_mandir}/man5/ausearch-expression.5*
2f4ad87a 268%{_mandir}/man5/zos-remote.conf.5*
08b12da9 269%{_mandir}/man8/audisp-remote.8*
526a1f46
JB
270%{_mandir}/man8/audispd-zos-remote.8*
271%{_mandir}/man8/audispd.8*
272%{_mandir}/man8/auditctl.8*
273%{_mandir}/man8/auditd.8*
2bfdaebd 274%{_mandir}/man8/aulast.8*
526a1f46
JB
275%{_mandir}/man8/aulastlog.8*
276%{_mandir}/man8/aureport.8*
277%{_mandir}/man8/ausearch.8*
08b12da9 278%{_mandir}/man8/ausyscall.8*
526a1f46 279%{_mandir}/man8/autrace.8*
54697230
JB
280
281%files libs
282%defattr(644,root,root,755)
283%attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
fef538cf 284%attr(755,root,root) %ghost /%{_lib}/libaudit.so.0
8ba70267 285%attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
fef538cf 286%attr(755,root,root) %ghost /%{_lib}/libauparse.so.0
7630c8d3 287%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
54697230
JB
288
289%files libs-devel
290%defattr(644,root,root,755)
291%attr(755,root,root) %{_libdir}/libaudit.so
8ba70267 292%attr(755,root,root) %{_libdir}/libauparse.so
54697230 293%{_libdir}/libaudit.la
8ba70267 294%{_libdir}/libauparse.la
6d3a6f20 295%{_includedir}/auparse*.h
54697230 296%{_includedir}/libaudit.h
526a1f46
JB
297%{_mandir}/man3/audit_*.3*
298%{_mandir}/man3/auparse_*.3*
299%{_mandir}/man3/ausearch_*.3*
300%{_mandir}/man3/get_auditfail_action.3*
301%{_mandir}/man3/set_aumessage_mode.3*
54697230
JB
302
303%files libs-static
304%defattr(644,root,root,755)
305%{_libdir}/libaudit.a
8ba70267 306%{_libdir}/libauparse.a
9ee6c1ce 307
526a1f46
JB
308%if %{with prelude}
309%files plugin-prelude
310%defattr(644,root,root,755)
311%attr(755,root,root) %{_sbindir}/audisp-prelude
312%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-prelude.conf
313%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-prelude.conf
314%{_mandir}/man5/audisp-prelude.conf.5*
315%{_mandir}/man8/audisp-prelude.8*
316%endif
317
57f09668 318%if %{with python}
9ee6c1ce
JB
319%files -n python-audit
320%defattr(644,root,root,755)
321%attr(755,root,root) %{py_sitedir}/_audit.so
84214962 322%attr(755,root,root) %{py_sitedir}/auparse.so
4c11c375 323%{py_sitedir}/audit.py[co]
ab8f94cb
JB
324
325%files -n system-config-audit -f system-config-audit.lang
326%defattr(644,root,root,755)
327%attr(755,root,root) %{_bindir}/system-config-audit
328%attr(755,root,root) %{_libexecdir}/system-config-audit-server
329%{_datadir}/system-config-audit
330%{_desktopdir}/system-config-audit.desktop
57f09668 331%endif
This page took 0.135778 seconds and 4 git commands to generate.