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