]>
Commit | Line | Data |
---|---|---|
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 | 7 | Summary: User space tools for 2.6 kernel auditing |
7f0a1e1e | 8 | Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6 |
54697230 | 9 | Name: audit |
693afa1c | 10 | Version: 2.0.4 |
7b5f298b | 11 | Release: 3 |
ab8f94cb | 12 | License: GPL v2+ |
54697230 JB |
13 | Group: Daemons |
14 | Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz | |
693afa1c | 15 | # Source0-md5: 90d2c70e74041fca5ac4b999cb915d68 |
de2a21fd JB |
16 | Source2: %{name}d.init |
17 | Source3: %{name}d.sysconfig | |
80475ae6 | 18 | Patch0: %{name}-install.patch |
1e78f2d9 | 19 | Patch1: %{name}-pthread.patch |
82313177 | 20 | Patch2: %{name}-m4.patch |
c02637dc | 21 | Patch3: %{name}-stat.patch |
54697230 JB |
22 | URL: http://people.redhat.com/sgrubb/audit/ |
23 | BuildRequires: autoconf >= 2.59 | |
10583781 | 24 | BuildRequires: automake >= 1:1.9 |
e5a8c0d8 | 25 | %{?with_pie:BuildRequires: gcc >= 5:3.4} |
0a348a92 | 26 | BuildRequires: gettext-devel >= 0.14.6 |
10583781 | 27 | BuildRequires: glibc-headers >= 6:2.3.6 |
1e78f2d9 | 28 | BuildRequires: heimdal-devel |
5e4a6748 | 29 | BuildRequires: intltool |
693afa1c | 30 | BuildRequires: libcap-ng-devel |
10583781 | 31 | BuildRequires: libstdc++-devel |
526a1f46 | 32 | %{?with_prelude:BuildRequires: libprelude-devel} |
54697230 | 33 | BuildRequires: libtool |
80475ae6 | 34 | BuildRequires: linux-libc-headers >= 7:2.6.20 |
792ef7a1 | 35 | BuildRequires: openldap-devel |
57f09668 | 36 | %if %{with python} |
84214962 | 37 | BuildRequires: python-devel >= 1:2.5 |
9ee6c1ce | 38 | BuildRequires: rpm-pythonprov |
7e695d35 | 39 | BuildRequires: swig-python |
57f09668 | 40 | %endif |
41 | BuildRequires: rpmbuild(macros) >= 1.268 | |
ab8f94cb | 42 | BuildRequires: sed >= 4.0 |
54697230 JB |
43 | Requires(post,preun): /sbin/chkconfig |
44 | Requires: %{name}-libs = %{version}-%{release} | |
96102055 | 45 | Requires: rc-scripts |
526a1f46 | 46 | Obsoletes: audit-audispd-plugins |
54697230 JB |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
49 | %define _sbindir /sbin | |
ab8f94cb JB |
50 | # use /lib, because this path is put in /usr/share/.../settings.py |
51 | %define _libexecdir %{_prefix}/lib | |
54697230 JB |
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 | ||
b27e8f95 JR |
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. | |
54697230 JB |
62 | |
63 | %package libs | |
5a56b716 | 64 | Summary: Dynamic audit libraries |
7f0a1e1e | 65 | Summary(pl.UTF-8): Biblioteki dynamiczne audit |
ab8f94cb | 66 | License: LGPL v2.1+ |
54697230 JB |
67 | Group: Libraries |
68 | ||
69 | %description libs | |
5a56b716 | 70 | The audit-libs package contains the dynamic libraries needed for |
54697230 JB |
71 | applications to use the audit framework. |
72 | ||
b27e8f95 | 73 | %description libs -l pl.UTF-8 |
5a56b716 | 74 | Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji |
b27e8f95 | 75 | używających środowiska audytu. |
54697230 JB |
76 | |
77 | %package libs-devel | |
5a56b716 | 78 | Summary: Header files for audit libraries |
7f0a1e1e | 79 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit |
ab8f94cb | 80 | License: LGPL v2.1+ |
54697230 JB |
81 | Group: Development/Libraries |
82 | Requires: %{name}-libs = %{version}-%{release} | |
ab8f94cb | 83 | Requires: linux-libc-headers >= 7:2.6.20 |
54697230 JB |
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 | ||
b27e8f95 JR |
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. | |
54697230 JB |
92 | |
93 | %package libs-static | |
5a56b716 | 94 | Summary: Static audit libraries |
7f0a1e1e | 95 | Summary(pl.UTF-8): Statyczne biblioteki audit |
ab8f94cb | 96 | License: LGPL v2.1+ |
54697230 JB |
97 | Group: Development/Libraries |
98 | Requires: %{name}-libs-devel = %{version}-%{release} | |
99 | ||
100 | %description libs-static | |
5a56b716 JB |
101 | The audit-libs-static package contains the static libraries for |
102 | developing applications that need to use the audit framework. | |
54697230 | 103 | |
b27e8f95 | 104 | %description libs-static -l pl.UTF-8 |
5a56b716 | 105 | Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji |
b27e8f95 | 106 | używających środowiska audytu. |
54697230 | 107 | |
526a1f46 JB |
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 | ||
9ee6c1ce JB |
124 | %package -n python-audit |
125 | Summary: Python interface to libaudit library | |
7f0a1e1e | 126 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit |
ab8f94cb | 127 | License: LGPL v2.1+ |
9ee6c1ce JB |
128 | Group: Libraries/Python |
129 | Requires: %{name}-libs = %{version}-%{release} | |
130 | ||
131 | %description -n python-audit | |
132 | Python interface to libaudit library. | |
133 | ||
b27e8f95 | 134 | %description -n python-audit -l pl.UTF-8 |
9ee6c1ce JB |
135 | Pythonowy interfejs do biblioteki libaudit. |
136 | ||
54697230 JB |
137 | %prep |
138 | %setup -q | |
eb9b3ab9 | 139 | %patch0 -p1 |
1e78f2d9 | 140 | %patch1 -p1 |
82313177 | 141 | %patch2 -p1 |
c02637dc | 142 | %patch3 -p1 |
1a8b063a | 143 | |
3d5ad897 | 144 | %if !%{with python} |
b89f6d79 | 145 | sed 's#swig/Makefile ##' -i configure.ac |
9d3991e5 | 146 | sed 's/swig//' -i Makefile.am |
57f09668 | 147 | %endif |
148 | ||
54697230 JB |
149 | %build |
150 | %{__libtoolize} | |
151 | %{__aclocal} | |
152 | %{__autoconf} | |
153 | %{__autoheader} | |
154 | %{__automake} | |
cc094a3e | 155 | %configure \ |
526a1f46 | 156 | --with-apparmor \ |
1e78f2d9 | 157 | --enable-gssapi-krb5 \ |
526a1f46 | 158 | %{?with_prelude:--with-prelude} |
e5a8c0d8 JB |
159 | # override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3 |
160 | %{__make} \ | |
aac5fae1 | 161 | %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"} |
54697230 | 162 | |
bf2e6acc JB |
163 | # temporarily not included in all |
164 | %{__make} -C auparse | |
165 | ||
54697230 JB |
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 | ||
bf2e6acc JB |
173 | # temporarily not included in all |
174 | %{__make} -C auparse install \ | |
175 | DESTDIR=$RPM_BUILD_ROOT | |
176 | ||
54697230 JB |
177 | install -d $RPM_BUILD_ROOT/%{_lib} |
178 | mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib} | |
fef538cf | 179 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \ |
1a8b063a | 180 | $RPM_BUILD_ROOT%{_libdir}/libaudit.so |
8ba70267 | 181 | mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib} |
fef538cf | 182 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \ |
8ba70267 | 183 | $RPM_BUILD_ROOT%{_libdir}/libauparse.so |
54697230 JB |
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 | ||
de2a21fd JB |
189 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd |
190 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd | |
191 | ||
57f09668 | 192 | %if %{with python} |
eb9b3ab9 | 193 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} |
8e99bb72 | 194 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} |
eb9b3ab9 | 195 | rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py |
8e99bb72 | 196 | rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a} |
57f09668 | 197 | %endif |
9ee6c1ce | 198 | |
54697230 JB |
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 | |
2a6b8c9c | 207 | %service auditd restart "audit daemon" |
54697230 JB |
208 | |
209 | %preun | |
210 | if [ "$1" = "0" ]; then | |
2a6b8c9c | 211 | %service auditd stop |
54697230 JB |
212 | /sbin/chkconfig --del auditd |
213 | fi | |
214 | ||
215 | %files | |
216 | %defattr(644,root,root,755) | |
bd0730be | 217 | %doc AUTHORS ChangeLog README THANKS TODO |
2bfdaebd | 218 | %attr(750,root,root) %{_bindir}/aulast |
08b12da9 JB |
219 | %attr(750,root,root) %{_bindir}/aulastlog |
220 | %attr(750,root,root) %{_bindir}/ausyscall | |
80475ae6 | 221 | %attr(750,root,root) %{_sbindir}/audispd |
54697230 JB |
222 | %attr(750,root,root) %{_sbindir}/auditctl |
223 | %attr(750,root,root) %{_sbindir}/auditd | |
e5a8c0d8 | 224 | %attr(750,root,root) %{_sbindir}/aureport |
54697230 JB |
225 | %attr(750,root,root) %{_sbindir}/ausearch |
226 | %attr(750,root,root) %{_sbindir}/autrace | |
08b12da9 | 227 | %attr(755,root,root) %{_sbindir}/audisp-remote |
2f4ad87a | 228 | %attr(755,root,root) %{_sbindir}/audispd-zos-remote |
0a348a92 JB |
229 | %dir %{_sysconfdir}/audisp |
230 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf | |
08b12da9 | 231 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf |
2f4ad87a | 232 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf |
0a348a92 JB |
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 | |
08b12da9 | 235 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf |
792ef7a1 | 236 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf |
0a348a92 | 237 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf |
7630c8d3 JB |
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 | |
80475ae6 | 241 | %attr(754,root,root) /etc/rc.d/init.d/auditd |
f6ae0a53 | 242 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd |
54697230 | 243 | %attr(750,root,root) %dir %{_var}/log/audit |
0a348a92 | 244 | %{_mandir}/man5/audispd.conf.5* |
08b12da9 | 245 | %{_mandir}/man5/audisp-remote.conf.5* |
80475ae6 | 246 | %{_mandir}/man5/auditd.conf.5* |
526a1f46 | 247 | %{_mandir}/man5/ausearch-expression.5* |
2f4ad87a | 248 | %{_mandir}/man5/zos-remote.conf.5* |
693afa1c | 249 | %{_mandir}/man7/audit.rules.7* |
08b12da9 | 250 | %{_mandir}/man8/audisp-remote.8* |
526a1f46 JB |
251 | %{_mandir}/man8/audispd-zos-remote.8* |
252 | %{_mandir}/man8/audispd.8* | |
253 | %{_mandir}/man8/auditctl.8* | |
254 | %{_mandir}/man8/auditd.8* | |
2bfdaebd | 255 | %{_mandir}/man8/aulast.8* |
526a1f46 JB |
256 | %{_mandir}/man8/aulastlog.8* |
257 | %{_mandir}/man8/aureport.8* | |
258 | %{_mandir}/man8/ausearch.8* | |
08b12da9 | 259 | %{_mandir}/man8/ausyscall.8* |
526a1f46 | 260 | %{_mandir}/man8/autrace.8* |
54697230 JB |
261 | |
262 | %files libs | |
263 | %defattr(644,root,root,755) | |
264 | %attr(755,root,root) /%{_lib}/libaudit.so.*.*.* | |
82313177 | 265 | %attr(755,root,root) %ghost /%{_lib}/libaudit.so.1 |
8ba70267 | 266 | %attr(755,root,root) /%{_lib}/libauparse.so.*.*.* |
fef538cf | 267 | %attr(755,root,root) %ghost /%{_lib}/libauparse.so.0 |
7630c8d3 | 268 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf |
693afa1c | 269 | %{_mandir}/man5/libaudit.conf.5* |
54697230 JB |
270 | |
271 | %files libs-devel | |
272 | %defattr(644,root,root,755) | |
273 | %attr(755,root,root) %{_libdir}/libaudit.so | |
8ba70267 | 274 | %attr(755,root,root) %{_libdir}/libauparse.so |
54697230 | 275 | %{_libdir}/libaudit.la |
8ba70267 | 276 | %{_libdir}/libauparse.la |
6d3a6f20 | 277 | %{_includedir}/auparse*.h |
54697230 | 278 | %{_includedir}/libaudit.h |
526a1f46 JB |
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* | |
54697230 JB |
284 | |
285 | %files libs-static | |
286 | %defattr(644,root,root,755) | |
287 | %{_libdir}/libaudit.a | |
8ba70267 | 288 | %{_libdir}/libauparse.a |
9ee6c1ce | 289 | |
526a1f46 JB |
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 | ||
57f09668 | 300 | %if %{with python} |
9ee6c1ce JB |
301 | %files -n python-audit |
302 | %defattr(644,root,root,755) | |
303 | %attr(755,root,root) %{py_sitedir}/_audit.so | |
84214962 | 304 | %attr(755,root,root) %{py_sitedir}/auparse.so |
4c11c375 | 305 | %{py_sitedir}/audit.py[co] |
57f09668 | 306 | %endif |