]>
Commit | Line | Data |
---|---|---|
e5a8c0d8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without pie # auditd as PIE binary | |
57f09668 | 4 | %bcond_without python # don't build python bindings |
e5a8c0d8 | 5 | # |
54697230 | 6 | Summary: User space tools for 2.6 kernel auditing |
7f0a1e1e | 7 | Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6 |
54697230 | 8 | Name: audit |
bd0730be AM |
9 | Version: 1.6.2 |
10 | Release: 1 | |
ab8f94cb | 11 | License: GPL v2+ |
54697230 JB |
12 | Group: Daemons |
13 | Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz | |
bd0730be | 14 | # Source0-md5: a95dbfa22e65669e4449f3accbe84aef |
de2a21fd JB |
15 | Source2: %{name}d.init |
16 | Source3: %{name}d.sysconfig | |
80475ae6 | 17 | Patch0: %{name}-install.patch |
54697230 JB |
18 | URL: http://people.redhat.com/sgrubb/audit/ |
19 | BuildRequires: autoconf >= 2.59 | |
10583781 | 20 | BuildRequires: automake >= 1:1.9 |
e5a8c0d8 | 21 | %{?with_pie:BuildRequires: gcc >= 5:3.4} |
0a348a92 | 22 | BuildRequires: gettext-devel >= 0.14.6 |
10583781 | 23 | BuildRequires: glibc-headers >= 6:2.3.6 |
5e4a6748 | 24 | BuildRequires: intltool |
10583781 | 25 | BuildRequires: libstdc++-devel |
54697230 | 26 | BuildRequires: libtool |
80475ae6 | 27 | BuildRequires: linux-libc-headers >= 7:2.6.20 |
57f09668 | 28 | %if %{with python} |
84214962 | 29 | BuildRequires: python-devel >= 1:2.5 |
9ee6c1ce | 30 | BuildRequires: rpm-pythonprov |
7e695d35 | 31 | BuildRequires: swig-python |
57f09668 | 32 | %endif |
33 | BuildRequires: rpmbuild(macros) >= 1.268 | |
ab8f94cb | 34 | BuildRequires: sed >= 4.0 |
54697230 JB |
35 | Requires(post,preun): /sbin/chkconfig |
36 | Requires: %{name}-libs = %{version}-%{release} | |
96102055 | 37 | Requires: rc-scripts |
54697230 JB |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %define _sbindir /sbin | |
ab8f94cb JB |
41 | # use /lib, because this path is put in /usr/share/.../settings.py |
42 | %define _libexecdir %{_prefix}/lib | |
54697230 JB |
43 | |
44 | %description | |
45 | The audit package contains the user space utilities for storing and | |
46 | processing the audit records generate by the audit subsystem in the | |
47 | Linux 2.6 kernel. | |
48 | ||
b27e8f95 JR |
49 | %description -l pl.UTF-8 |
50 | Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania | |
51 | i przetwarzania rekordów audytu generowanych przez podsystem audytu w | |
52 | jądrach Linuksa 2.6. | |
54697230 JB |
53 | |
54 | %package libs | |
5a56b716 | 55 | Summary: Dynamic audit libraries |
7f0a1e1e | 56 | Summary(pl.UTF-8): Biblioteki dynamiczne audit |
ab8f94cb | 57 | License: LGPL v2.1+ |
54697230 JB |
58 | Group: Libraries |
59 | ||
60 | %description libs | |
5a56b716 | 61 | The audit-libs package contains the dynamic libraries needed for |
54697230 JB |
62 | applications to use the audit framework. |
63 | ||
b27e8f95 | 64 | %description libs -l pl.UTF-8 |
5a56b716 | 65 | Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji |
b27e8f95 | 66 | używających środowiska audytu. |
54697230 JB |
67 | |
68 | %package libs-devel | |
5a56b716 | 69 | Summary: Header files for audit libraries |
7f0a1e1e | 70 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit |
ab8f94cb | 71 | License: LGPL v2.1+ |
54697230 JB |
72 | Group: Development/Libraries |
73 | Requires: %{name}-libs = %{version}-%{release} | |
ab8f94cb | 74 | Requires: linux-libc-headers >= 7:2.6.20 |
54697230 JB |
75 | |
76 | %description libs-devel | |
77 | The audit-libs-devel package contains the header files needed for | |
78 | developing applications that need to use the audit framework library. | |
79 | ||
b27e8f95 JR |
80 | %description libs-devel -l pl.UTF-8 |
81 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji | |
82 | używających biblioteki środowiska audytu. | |
54697230 JB |
83 | |
84 | %package libs-static | |
5a56b716 | 85 | Summary: Static audit libraries |
7f0a1e1e | 86 | Summary(pl.UTF-8): Statyczne biblioteki audit |
ab8f94cb | 87 | License: LGPL v2.1+ |
54697230 JB |
88 | Group: Development/Libraries |
89 | Requires: %{name}-libs-devel = %{version}-%{release} | |
90 | ||
91 | %description libs-static | |
5a56b716 JB |
92 | The audit-libs-static package contains the static libraries for |
93 | developing applications that need to use the audit framework. | |
54697230 | 94 | |
b27e8f95 | 95 | %description libs-static -l pl.UTF-8 |
5a56b716 | 96 | Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji |
b27e8f95 | 97 | używających środowiska audytu. |
54697230 | 98 | |
bd0730be AM |
99 | %package audispd-plugins |
100 | Summary: Plugins for the audit event dispatcher | |
101 | Group: Daemons | |
102 | Requires: %{name} = %{version}-%{release} | |
103 | Requires: %{name}-libs = %{version}-%{release} | |
104 | ||
105 | %description audispd-plugins | |
106 | The audispd-plugins package provides plugins for the real-time | |
107 | interface to the audit system, audispd. These plugins can do things | |
108 | like relay events to remote machines or analyze events for suspicious | |
109 | behavior. | |
110 | ||
9ee6c1ce JB |
111 | %package -n python-audit |
112 | Summary: Python interface to libaudit library | |
7f0a1e1e | 113 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit |
ab8f94cb | 114 | License: LGPL v2.1+ |
9ee6c1ce JB |
115 | Group: Libraries/Python |
116 | Requires: %{name}-libs = %{version}-%{release} | |
117 | ||
118 | %description -n python-audit | |
119 | Python interface to libaudit library. | |
120 | ||
b27e8f95 | 121 | %description -n python-audit -l pl.UTF-8 |
9ee6c1ce JB |
122 | Pythonowy interfejs do biblioteki libaudit. |
123 | ||
ab8f94cb JB |
124 | %package -n system-config-audit |
125 | Summary: Utility for editing audit configuration | |
126 | Summary(pl.UTF-8): Narzędzie do zmiany konfiguracji audytu | |
127 | License: GPL v2 | |
128 | Group: Applications/System | |
129 | Requires: %{name} = %{version}-%{release} | |
7dadedca | 130 | Version: 0.4.3 |
ab8f94cb JB |
131 | Requires: python-pygtk-libglade >= 2:2.0 |
132 | Requires: usermode | |
133 | #Requires: usermode-gtk ??? | |
134 | ||
135 | %description -n system-config-audit | |
136 | An utility for editing audit configuration. | |
137 | ||
138 | %description -n system-config-audit -l pl.UTF-8 | |
139 | Narzędzie do zmiany konfiguracji audytu. | |
140 | ||
54697230 JB |
141 | %prep |
142 | %setup -q | |
eb9b3ab9 | 143 | %patch0 -p1 |
1a8b063a | 144 | |
3d5ad897 | 145 | %if !%{with python} |
b89f6d79 | 146 | sed 's#swig/Makefile ##' -i configure.ac |
9d3991e5 | 147 | sed 's/swig//' -i Makefile.am |
57f09668 | 148 | %endif |
149 | ||
ab8f94cb JB |
150 | sed -i -e 's,/main\.py,/main.pyc,' system-config-audit/src/system-config-audit.in |
151 | ||
54697230 JB |
152 | %build |
153 | %{__libtoolize} | |
154 | %{__aclocal} | |
155 | %{__autoconf} | |
156 | %{__autoheader} | |
157 | %{__automake} | |
0a348a92 JB |
158 | cd system-config-audit |
159 | %{__aclocal} | |
160 | %{__autoconf} | |
161 | %{__autoheader} | |
162 | %{__automake} | |
163 | cd .. | |
cc094a3e AM |
164 | %configure \ |
165 | --with-apparmor | |
e5a8c0d8 JB |
166 | # override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3 |
167 | %{__make} \ | |
aac5fae1 | 168 | %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"} |
54697230 | 169 | |
bf2e6acc JB |
170 | # temporarily not included in all |
171 | %{__make} -C auparse | |
172 | ||
54697230 JB |
173 | %install |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | install -d $RPM_BUILD_ROOT%{_var}/log/audit | |
176 | ||
177 | %{__make} install \ | |
178 | DESTDIR=$RPM_BUILD_ROOT | |
179 | ||
bf2e6acc JB |
180 | # temporarily not included in all |
181 | %{__make} -C auparse install \ | |
182 | DESTDIR=$RPM_BUILD_ROOT | |
183 | ||
54697230 JB |
184 | install -d $RPM_BUILD_ROOT/%{_lib} |
185 | mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib} | |
de2a21fd | 186 | ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libaudit.so.*.*.*) \ |
1a8b063a | 187 | $RPM_BUILD_ROOT%{_libdir}/libaudit.so |
8ba70267 JB |
188 | mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib} |
189 | ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libauparse.so.*.*.*) \ | |
190 | $RPM_BUILD_ROOT%{_libdir}/libauparse.so | |
54697230 JB |
191 | |
192 | # We manually install this since Makefile doesn't | |
193 | install -d $RPM_BUILD_ROOT%{_includedir} | |
194 | install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir} | |
195 | ||
de2a21fd JB |
196 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd |
197 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd | |
198 | ||
57f09668 | 199 | %if %{with python} |
eb9b3ab9 | 200 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} |
8e99bb72 | 201 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} |
eb9b3ab9 | 202 | rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py |
8e99bb72 | 203 | rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a} |
ab8f94cb JB |
204 | |
205 | %py_postclean $RPM_BUILD_ROOT%{_datadir}/system-config-audit | |
206 | %find_lang system-config-audit | |
57f09668 | 207 | %endif |
9ee6c1ce | 208 | |
54697230 JB |
209 | %clean |
210 | rm -rf $RPM_BUILD_ROOT | |
211 | ||
212 | %post libs -p /sbin/ldconfig | |
213 | %postun libs -p /sbin/ldconfig | |
214 | ||
215 | %post | |
216 | /sbin/chkconfig --add auditd | |
2a6b8c9c | 217 | %service auditd restart "audit daemon" |
54697230 JB |
218 | |
219 | %preun | |
220 | if [ "$1" = "0" ]; then | |
2a6b8c9c | 221 | %service auditd stop |
54697230 JB |
222 | /sbin/chkconfig --del auditd |
223 | fi | |
224 | ||
225 | %files | |
226 | %defattr(644,root,root,755) | |
bd0730be | 227 | %doc AUTHORS ChangeLog README THANKS TODO |
80475ae6 | 228 | %attr(750,root,root) %{_sbindir}/audispd |
54697230 JB |
229 | %attr(750,root,root) %{_sbindir}/auditctl |
230 | %attr(750,root,root) %{_sbindir}/auditd | |
e5a8c0d8 | 231 | %attr(750,root,root) %{_sbindir}/aureport |
54697230 JB |
232 | %attr(750,root,root) %{_sbindir}/ausearch |
233 | %attr(750,root,root) %{_sbindir}/autrace | |
0a348a92 JB |
234 | %dir %{_sysconfdir}/audisp |
235 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf | |
236 | %dir %{_sysconfdir}/audisp/plugins.d | |
237 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf | |
238 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf | |
7630c8d3 JB |
239 | %dir %{_sysconfdir}/audit |
240 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf | |
241 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules | |
80475ae6 | 242 | %attr(754,root,root) /etc/rc.d/init.d/auditd |
f6ae0a53 | 243 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd |
54697230 | 244 | %attr(750,root,root) %dir %{_var}/log/audit |
0a348a92 | 245 | %{_mandir}/man5/audispd.conf.5* |
80475ae6 | 246 | %{_mandir}/man5/auditd.conf.5* |
54697230 | 247 | %{_mandir}/man8/* |
bd0730be AM |
248 | %dir %{_sysconfdir}/audisp |
249 | %dir %{_sysconfdir}/audisp/plugins.d | |
54697230 JB |
250 | |
251 | %files libs | |
252 | %defattr(644,root,root,755) | |
253 | %attr(755,root,root) /%{_lib}/libaudit.so.*.*.* | |
8ba70267 | 254 | %attr(755,root,root) /%{_lib}/libauparse.so.*.*.* |
7630c8d3 | 255 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf |
54697230 JB |
256 | |
257 | %files libs-devel | |
258 | %defattr(644,root,root,755) | |
259 | %attr(755,root,root) %{_libdir}/libaudit.so | |
8ba70267 | 260 | %attr(755,root,root) %{_libdir}/libauparse.so |
54697230 | 261 | %{_libdir}/libaudit.la |
8ba70267 | 262 | %{_libdir}/libauparse.la |
6d3a6f20 | 263 | %{_includedir}/auparse*.h |
54697230 JB |
264 | %{_includedir}/libaudit.h |
265 | %{_mandir}/man3/* | |
266 | ||
267 | %files libs-static | |
268 | %defattr(644,root,root,755) | |
269 | %{_libdir}/libaudit.a | |
8ba70267 | 270 | %{_libdir}/libauparse.a |
9ee6c1ce | 271 | |
bd0730be AM |
272 | %files audispd-plugins |
273 | %defattr(644,root,root,755) | |
274 | %attr(755,root,root) %{_sbindir}/audisp-ids | |
275 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/*.conf | |
276 | ||
57f09668 | 277 | %if %{with python} |
9ee6c1ce JB |
278 | %files -n python-audit |
279 | %defattr(644,root,root,755) | |
280 | %attr(755,root,root) %{py_sitedir}/_audit.so | |
84214962 JB |
281 | %attr(755,root,root) %{py_sitedir}/auparse.so |
282 | %{py_sitedir}/auparse-*.egg-info | |
8e99bb72 | 283 | %{py_sitescriptdir}/audit.py[co] |
ab8f94cb JB |
284 | |
285 | %files -n system-config-audit -f system-config-audit.lang | |
286 | %defattr(644,root,root,755) | |
287 | %attr(755,root,root) %{_bindir}/system-config-audit | |
288 | %attr(755,root,root) %{_libexecdir}/system-config-audit-server | |
289 | %{_datadir}/system-config-audit | |
290 | %{_desktopdir}/system-config-audit.desktop | |
57f09668 | 291 | %endif |