]>
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 |
59d53b28 | 10 | Version: 2.1 |
68d62ac9 | 11 | Release: 1 |
ab8f94cb | 12 | License: GPL v2+ |
54697230 JB |
13 | Group: Daemons |
14 | Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz | |
59d53b28 | 15 | # Source0-md5: 5a936571764a4d39eae69c2958331e20 |
de2a21fd JB |
16 | Source2: %{name}d.init |
17 | Source3: %{name}d.sysconfig | |
80475ae6 | 18 | Patch0: %{name}-install.patch |
b0722891 | 19 | Patch1: %{name}-m4.patch |
54697230 JB |
20 | URL: http://people.redhat.com/sgrubb/audit/ |
21 | BuildRequires: autoconf >= 2.59 | |
10583781 | 22 | BuildRequires: automake >= 1:1.9 |
e5a8c0d8 | 23 | %{?with_pie:BuildRequires: gcc >= 5:3.4} |
10583781 | 24 | BuildRequires: glibc-headers >= 6:2.3.6 |
1e78f2d9 | 25 | BuildRequires: heimdal-devel |
693afa1c | 26 | BuildRequires: libcap-ng-devel |
526a1f46 | 27 | %{?with_prelude:BuildRequires: libprelude-devel} |
54697230 | 28 | BuildRequires: libtool |
80475ae6 | 29 | BuildRequires: linux-libc-headers >= 7:2.6.20 |
792ef7a1 | 30 | BuildRequires: openldap-devel |
57f09668 | 31 | %if %{with python} |
84214962 | 32 | BuildRequires: python-devel >= 1:2.5 |
9ee6c1ce | 33 | BuildRequires: rpm-pythonprov |
7e695d35 | 34 | BuildRequires: swig-python |
57f09668 | 35 | %endif |
36 | BuildRequires: rpmbuild(macros) >= 1.268 | |
ab8f94cb | 37 | BuildRequires: sed >= 4.0 |
54697230 JB |
38 | Requires(post,preun): /sbin/chkconfig |
39 | Requires: %{name}-libs = %{version}-%{release} | |
96102055 | 40 | Requires: rc-scripts |
526a1f46 | 41 | Obsoletes: audit-audispd-plugins |
54697230 JB |
42 | BuildRoot: %{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 | |
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 | ||
b27e8f95 JR |
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. | |
54697230 JB |
57 | |
58 | %package libs | |
5a56b716 | 59 | Summary: Dynamic audit libraries |
7f0a1e1e | 60 | Summary(pl.UTF-8): Biblioteki dynamiczne audit |
ab8f94cb | 61 | License: LGPL v2.1+ |
54697230 JB |
62 | Group: Libraries |
63 | ||
64 | %description libs | |
5a56b716 | 65 | The audit-libs package contains the dynamic libraries needed for |
54697230 JB |
66 | applications to use the audit framework. |
67 | ||
b27e8f95 | 68 | %description libs -l pl.UTF-8 |
5a56b716 | 69 | Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji |
b27e8f95 | 70 | używających środowiska audytu. |
54697230 JB |
71 | |
72 | %package libs-devel | |
5a56b716 | 73 | Summary: Header files for audit libraries |
7f0a1e1e | 74 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit |
ab8f94cb | 75 | License: LGPL v2.1+ |
54697230 JB |
76 | Group: Development/Libraries |
77 | Requires: %{name}-libs = %{version}-%{release} | |
ab8f94cb | 78 | Requires: linux-libc-headers >= 7:2.6.20 |
54697230 JB |
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 | ||
b27e8f95 JR |
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. | |
54697230 JB |
87 | |
88 | %package libs-static | |
5a56b716 | 89 | Summary: Static audit libraries |
7f0a1e1e | 90 | Summary(pl.UTF-8): Statyczne biblioteki audit |
ab8f94cb | 91 | License: LGPL v2.1+ |
54697230 JB |
92 | Group: Development/Libraries |
93 | Requires: %{name}-libs-devel = %{version}-%{release} | |
94 | ||
95 | %description libs-static | |
5a56b716 JB |
96 | The audit-libs-static package contains the static libraries for |
97 | developing applications that need to use the audit framework. | |
54697230 | 98 | |
b27e8f95 | 99 | %description libs-static -l pl.UTF-8 |
5a56b716 | 100 | Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji |
b27e8f95 | 101 | używających środowiska audytu. |
54697230 | 102 | |
526a1f46 JB |
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 | ||
9ee6c1ce JB |
119 | %package -n python-audit |
120 | Summary: Python interface to libaudit library | |
7f0a1e1e | 121 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit |
ab8f94cb | 122 | License: LGPL v2.1+ |
9ee6c1ce JB |
123 | Group: Libraries/Python |
124 | Requires: %{name}-libs = %{version}-%{release} | |
125 | ||
126 | %description -n python-audit | |
127 | Python interface to libaudit library. | |
128 | ||
b27e8f95 | 129 | %description -n python-audit -l pl.UTF-8 |
9ee6c1ce JB |
130 | Pythonowy interfejs do biblioteki libaudit. |
131 | ||
54697230 JB |
132 | %prep |
133 | %setup -q | |
eb9b3ab9 | 134 | %patch0 -p1 |
1e78f2d9 | 135 | %patch1 -p1 |
1a8b063a | 136 | |
68d62ac9 | 137 | %if %{without python} |
b89f6d79 | 138 | sed 's#swig/Makefile ##' -i configure.ac |
9d3991e5 | 139 | sed 's/swig//' -i Makefile.am |
57f09668 | 140 | %endif |
141 | ||
54697230 JB |
142 | %build |
143 | %{__libtoolize} | |
144 | %{__aclocal} | |
145 | %{__autoconf} | |
146 | %{__autoheader} | |
147 | %{__automake} | |
cc094a3e | 148 | %configure \ |
526a1f46 | 149 | --with-apparmor \ |
1e78f2d9 | 150 | --enable-gssapi-krb5 \ |
526a1f46 | 151 | %{?with_prelude:--with-prelude} |
e5a8c0d8 JB |
152 | # override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3 |
153 | %{__make} \ | |
aac5fae1 | 154 | %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"} |
54697230 | 155 | |
bf2e6acc JB |
156 | # temporarily not included in all |
157 | %{__make} -C auparse | |
158 | ||
54697230 JB |
159 | %install |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | install -d $RPM_BUILD_ROOT%{_var}/log/audit | |
162 | ||
163 | %{__make} install \ | |
164 | DESTDIR=$RPM_BUILD_ROOT | |
165 | ||
bf2e6acc JB |
166 | # temporarily not included in all |
167 | %{__make} -C auparse install \ | |
168 | DESTDIR=$RPM_BUILD_ROOT | |
169 | ||
54697230 JB |
170 | install -d $RPM_BUILD_ROOT/%{_lib} |
171 | mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib} | |
fef538cf | 172 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \ |
1a8b063a | 173 | $RPM_BUILD_ROOT%{_libdir}/libaudit.so |
8ba70267 | 174 | mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib} |
fef538cf | 175 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \ |
8ba70267 | 176 | $RPM_BUILD_ROOT%{_libdir}/libauparse.so |
54697230 JB |
177 | |
178 | # We manually install this since Makefile doesn't | |
179 | install -d $RPM_BUILD_ROOT%{_includedir} | |
180 | install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir} | |
181 | ||
de2a21fd JB |
182 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd |
183 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd | |
184 | ||
57f09668 | 185 | %if %{with python} |
68d62ac9 JB |
186 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
187 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
188 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.py | |
189 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a} | |
57f09668 | 190 | %endif |
9ee6c1ce | 191 | |
54697230 JB |
192 | %clean |
193 | rm -rf $RPM_BUILD_ROOT | |
194 | ||
195 | %post libs -p /sbin/ldconfig | |
196 | %postun libs -p /sbin/ldconfig | |
197 | ||
198 | %post | |
199 | /sbin/chkconfig --add auditd | |
2a6b8c9c | 200 | %service auditd restart "audit daemon" |
54697230 JB |
201 | |
202 | %preun | |
203 | if [ "$1" = "0" ]; then | |
2a6b8c9c | 204 | %service auditd stop |
54697230 JB |
205 | /sbin/chkconfig --del auditd |
206 | fi | |
207 | ||
208 | %files | |
209 | %defattr(644,root,root,755) | |
bd0730be | 210 | %doc AUTHORS ChangeLog README THANKS TODO |
2bfdaebd | 211 | %attr(750,root,root) %{_bindir}/aulast |
08b12da9 JB |
212 | %attr(750,root,root) %{_bindir}/aulastlog |
213 | %attr(750,root,root) %{_bindir}/ausyscall | |
80475ae6 | 214 | %attr(750,root,root) %{_sbindir}/audispd |
54697230 JB |
215 | %attr(750,root,root) %{_sbindir}/auditctl |
216 | %attr(750,root,root) %{_sbindir}/auditd | |
e5a8c0d8 | 217 | %attr(750,root,root) %{_sbindir}/aureport |
54697230 JB |
218 | %attr(750,root,root) %{_sbindir}/ausearch |
219 | %attr(750,root,root) %{_sbindir}/autrace | |
08b12da9 | 220 | %attr(755,root,root) %{_sbindir}/audisp-remote |
2f4ad87a | 221 | %attr(755,root,root) %{_sbindir}/audispd-zos-remote |
0a348a92 JB |
222 | %dir %{_sysconfdir}/audisp |
223 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf | |
08b12da9 | 224 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf |
2f4ad87a | 225 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf |
0a348a92 JB |
226 | %dir %{_sysconfdir}/audisp/plugins.d |
227 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf | |
08b12da9 | 228 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf |
792ef7a1 | 229 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf |
0a348a92 | 230 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf |
7630c8d3 JB |
231 | %dir %{_sysconfdir}/audit |
232 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf | |
233 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules | |
80475ae6 | 234 | %attr(754,root,root) /etc/rc.d/init.d/auditd |
f6ae0a53 | 235 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd |
54697230 | 236 | %attr(750,root,root) %dir %{_var}/log/audit |
0a348a92 | 237 | %{_mandir}/man5/audispd.conf.5* |
08b12da9 | 238 | %{_mandir}/man5/audisp-remote.conf.5* |
80475ae6 | 239 | %{_mandir}/man5/auditd.conf.5* |
526a1f46 | 240 | %{_mandir}/man5/ausearch-expression.5* |
2f4ad87a | 241 | %{_mandir}/man5/zos-remote.conf.5* |
693afa1c | 242 | %{_mandir}/man7/audit.rules.7* |
08b12da9 | 243 | %{_mandir}/man8/audisp-remote.8* |
526a1f46 JB |
244 | %{_mandir}/man8/audispd-zos-remote.8* |
245 | %{_mandir}/man8/audispd.8* | |
246 | %{_mandir}/man8/auditctl.8* | |
247 | %{_mandir}/man8/auditd.8* | |
2bfdaebd | 248 | %{_mandir}/man8/aulast.8* |
526a1f46 JB |
249 | %{_mandir}/man8/aulastlog.8* |
250 | %{_mandir}/man8/aureport.8* | |
251 | %{_mandir}/man8/ausearch.8* | |
08b12da9 | 252 | %{_mandir}/man8/ausyscall.8* |
526a1f46 | 253 | %{_mandir}/man8/autrace.8* |
54697230 JB |
254 | |
255 | %files libs | |
256 | %defattr(644,root,root,755) | |
257 | %attr(755,root,root) /%{_lib}/libaudit.so.*.*.* | |
82313177 | 258 | %attr(755,root,root) %ghost /%{_lib}/libaudit.so.1 |
8ba70267 | 259 | %attr(755,root,root) /%{_lib}/libauparse.so.*.*.* |
fef538cf | 260 | %attr(755,root,root) %ghost /%{_lib}/libauparse.so.0 |
7630c8d3 | 261 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf |
693afa1c | 262 | %{_mandir}/man5/libaudit.conf.5* |
54697230 JB |
263 | |
264 | %files libs-devel | |
265 | %defattr(644,root,root,755) | |
266 | %attr(755,root,root) %{_libdir}/libaudit.so | |
8ba70267 | 267 | %attr(755,root,root) %{_libdir}/libauparse.so |
54697230 | 268 | %{_libdir}/libaudit.la |
8ba70267 | 269 | %{_libdir}/libauparse.la |
6d3a6f20 | 270 | %{_includedir}/auparse*.h |
54697230 | 271 | %{_includedir}/libaudit.h |
526a1f46 JB |
272 | %{_mandir}/man3/audit_*.3* |
273 | %{_mandir}/man3/auparse_*.3* | |
274 | %{_mandir}/man3/ausearch_*.3* | |
275 | %{_mandir}/man3/get_auditfail_action.3* | |
276 | %{_mandir}/man3/set_aumessage_mode.3* | |
54697230 JB |
277 | |
278 | %files libs-static | |
279 | %defattr(644,root,root,755) | |
280 | %{_libdir}/libaudit.a | |
8ba70267 | 281 | %{_libdir}/libauparse.a |
9ee6c1ce | 282 | |
526a1f46 JB |
283 | %if %{with prelude} |
284 | %files plugin-prelude | |
285 | %defattr(644,root,root,755) | |
286 | %attr(755,root,root) %{_sbindir}/audisp-prelude | |
287 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-prelude.conf | |
288 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-prelude.conf | |
289 | %{_mandir}/man5/audisp-prelude.conf.5* | |
290 | %{_mandir}/man8/audisp-prelude.8* | |
291 | %endif | |
292 | ||
57f09668 | 293 | %if %{with python} |
9ee6c1ce JB |
294 | %files -n python-audit |
295 | %defattr(644,root,root,755) | |
296 | %attr(755,root,root) %{py_sitedir}/_audit.so | |
84214962 | 297 | %attr(755,root,root) %{py_sitedir}/auparse.so |
4c11c375 | 298 | %{py_sitedir}/audit.py[co] |
57f09668 | 299 | %endif |