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