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