]>
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 |
e47ede88 | 9 | Version: 1.6.8 |
bb52edef | 10 | Release: 2 |
ab8f94cb | 11 | License: GPL v2+ |
54697230 JB |
12 | Group: Daemons |
13 | Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz | |
e47ede88 | 14 | # Source0-md5: 67cd6d2995bbb0a8b3c37ce484d758f5 |
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 |
792ef7a1 | 28 | BuildRequires: openldap-devel |
57f09668 | 29 | %if %{with python} |
84214962 | 30 | BuildRequires: python-devel >= 1:2.5 |
9ee6c1ce | 31 | BuildRequires: rpm-pythonprov |
7e695d35 | 32 | BuildRequires: swig-python |
57f09668 | 33 | %endif |
34 | BuildRequires: rpmbuild(macros) >= 1.268 | |
ab8f94cb | 35 | BuildRequires: sed >= 4.0 |
54697230 JB |
36 | Requires(post,preun): /sbin/chkconfig |
37 | Requires: %{name}-libs = %{version}-%{release} | |
96102055 | 38 | Requires: rc-scripts |
54697230 JB |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %define _sbindir /sbin | |
ab8f94cb JB |
42 | # use /lib, because this path is put in /usr/share/.../settings.py |
43 | %define _libexecdir %{_prefix}/lib | |
54697230 JB |
44 | |
45 | %description | |
46 | The audit package contains the user space utilities for storing and | |
47 | processing the audit records generate by the audit subsystem in the | |
48 | Linux 2.6 kernel. | |
49 | ||
b27e8f95 JR |
50 | %description -l pl.UTF-8 |
51 | Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania | |
52 | i przetwarzania rekordów audytu generowanych przez podsystem audytu w | |
53 | jądrach Linuksa 2.6. | |
54697230 JB |
54 | |
55 | %package libs | |
5a56b716 | 56 | Summary: Dynamic audit libraries |
7f0a1e1e | 57 | Summary(pl.UTF-8): Biblioteki dynamiczne audit |
ab8f94cb | 58 | License: LGPL v2.1+ |
54697230 JB |
59 | Group: Libraries |
60 | ||
61 | %description libs | |
5a56b716 | 62 | The audit-libs package contains the dynamic libraries needed for |
54697230 JB |
63 | applications to use the audit framework. |
64 | ||
b27e8f95 | 65 | %description libs -l pl.UTF-8 |
5a56b716 | 66 | Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji |
b27e8f95 | 67 | używających środowiska audytu. |
54697230 JB |
68 | |
69 | %package libs-devel | |
5a56b716 | 70 | Summary: Header files for audit libraries |
7f0a1e1e | 71 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit |
ab8f94cb | 72 | License: LGPL v2.1+ |
54697230 JB |
73 | Group: Development/Libraries |
74 | Requires: %{name}-libs = %{version}-%{release} | |
ab8f94cb | 75 | Requires: linux-libc-headers >= 7:2.6.20 |
54697230 JB |
76 | |
77 | %description libs-devel | |
78 | The audit-libs-devel package contains the header files needed for | |
79 | developing applications that need to use the audit framework library. | |
80 | ||
b27e8f95 JR |
81 | %description libs-devel -l pl.UTF-8 |
82 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji | |
83 | używających biblioteki środowiska audytu. | |
54697230 JB |
84 | |
85 | %package libs-static | |
5a56b716 | 86 | Summary: Static audit libraries |
7f0a1e1e | 87 | Summary(pl.UTF-8): Statyczne biblioteki audit |
ab8f94cb | 88 | License: LGPL v2.1+ |
54697230 JB |
89 | Group: Development/Libraries |
90 | Requires: %{name}-libs-devel = %{version}-%{release} | |
91 | ||
92 | %description libs-static | |
5a56b716 JB |
93 | The audit-libs-static package contains the static libraries for |
94 | developing applications that need to use the audit framework. | |
54697230 | 95 | |
b27e8f95 | 96 | %description libs-static -l pl.UTF-8 |
5a56b716 | 97 | Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji |
b27e8f95 | 98 | używających środowiska audytu. |
54697230 | 99 | |
9ee6c1ce JB |
100 | %package -n python-audit |
101 | Summary: Python interface to libaudit library | |
7f0a1e1e | 102 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit |
ab8f94cb | 103 | License: LGPL v2.1+ |
9ee6c1ce JB |
104 | Group: Libraries/Python |
105 | Requires: %{name}-libs = %{version}-%{release} | |
106 | ||
107 | %description -n python-audit | |
108 | Python interface to libaudit library. | |
109 | ||
b27e8f95 | 110 | %description -n python-audit -l pl.UTF-8 |
9ee6c1ce JB |
111 | Pythonowy interfejs do biblioteki libaudit. |
112 | ||
ab8f94cb JB |
113 | %package -n system-config-audit |
114 | Summary: Utility for editing audit configuration | |
115 | Summary(pl.UTF-8): Narzędzie do zmiany konfiguracji audytu | |
116 | License: GPL v2 | |
117 | Group: Applications/System | |
118 | Requires: %{name} = %{version}-%{release} | |
7dadedca | 119 | Version: 0.4.3 |
6fc26f9b | 120 | Requires: python-pygtk-glade >= 2:2.0 |
ab8f94cb JB |
121 | Requires: usermode |
122 | #Requires: usermode-gtk ??? | |
123 | ||
124 | %description -n system-config-audit | |
125 | An utility for editing audit configuration. | |
126 | ||
127 | %description -n system-config-audit -l pl.UTF-8 | |
128 | Narzędzie do zmiany konfiguracji audytu. | |
129 | ||
54697230 JB |
130 | %prep |
131 | %setup -q | |
eb9b3ab9 | 132 | %patch0 -p1 |
1a8b063a | 133 | |
3d5ad897 | 134 | %if !%{with python} |
b89f6d79 | 135 | sed 's#swig/Makefile ##' -i configure.ac |
9d3991e5 | 136 | sed 's/swig//' -i Makefile.am |
57f09668 | 137 | %endif |
138 | ||
ab8f94cb JB |
139 | sed -i -e 's,/main\.py,/main.pyc,' system-config-audit/src/system-config-audit.in |
140 | ||
54697230 JB |
141 | %build |
142 | %{__libtoolize} | |
143 | %{__aclocal} | |
144 | %{__autoconf} | |
145 | %{__autoheader} | |
146 | %{__automake} | |
0a348a92 JB |
147 | cd system-config-audit |
148 | %{__aclocal} | |
149 | %{__autoconf} | |
150 | %{__autoheader} | |
151 | %{__automake} | |
152 | cd .. | |
cc094a3e AM |
153 | %configure \ |
154 | --with-apparmor | |
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} |
ab8f94cb JB |
193 | |
194 | %py_postclean $RPM_BUILD_ROOT%{_datadir}/system-config-audit | |
195 | %find_lang system-config-audit | |
57f09668 | 196 | %endif |
9ee6c1ce | 197 | |
54697230 JB |
198 | %clean |
199 | rm -rf $RPM_BUILD_ROOT | |
200 | ||
201 | %post libs -p /sbin/ldconfig | |
202 | %postun libs -p /sbin/ldconfig | |
203 | ||
204 | %post | |
205 | /sbin/chkconfig --add auditd | |
2a6b8c9c | 206 | %service auditd restart "audit daemon" |
54697230 JB |
207 | |
208 | %preun | |
209 | if [ "$1" = "0" ]; then | |
2a6b8c9c | 210 | %service auditd stop |
54697230 JB |
211 | /sbin/chkconfig --del auditd |
212 | fi | |
213 | ||
214 | %files | |
215 | %defattr(644,root,root,755) | |
bd0730be | 216 | %doc AUTHORS ChangeLog README THANKS TODO |
80475ae6 | 217 | %attr(750,root,root) %{_sbindir}/audispd |
54697230 JB |
218 | %attr(750,root,root) %{_sbindir}/auditctl |
219 | %attr(750,root,root) %{_sbindir}/auditd | |
792ef7a1 | 220 | %attr(750,root,root) %{_sbindir}/aulastlog |
e5a8c0d8 | 221 | %attr(750,root,root) %{_sbindir}/aureport |
54697230 JB |
222 | %attr(750,root,root) %{_sbindir}/ausearch |
223 | %attr(750,root,root) %{_sbindir}/autrace | |
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 | |
2f4ad87a | 227 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf |
0a348a92 JB |
228 | %dir %{_sysconfdir}/audisp/plugins.d |
229 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf | |
792ef7a1 | 230 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf |
0a348a92 | 231 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf |
7630c8d3 JB |
232 | %dir %{_sysconfdir}/audit |
233 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf | |
234 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules | |
80475ae6 | 235 | %attr(754,root,root) /etc/rc.d/init.d/auditd |
f6ae0a53 | 236 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd |
54697230 | 237 | %attr(750,root,root) %dir %{_var}/log/audit |
0a348a92 | 238 | %{_mandir}/man5/audispd.conf.5* |
80475ae6 | 239 | %{_mandir}/man5/auditd.conf.5* |
2f4ad87a | 240 | %{_mandir}/man5/zos-remote.conf.5* |
54697230 | 241 | %{_mandir}/man8/* |
bd0730be AM |
242 | %dir %{_sysconfdir}/audisp |
243 | %dir %{_sysconfdir}/audisp/plugins.d | |
54697230 JB |
244 | |
245 | %files libs | |
246 | %defattr(644,root,root,755) | |
247 | %attr(755,root,root) /%{_lib}/libaudit.so.*.*.* | |
fef538cf | 248 | %attr(755,root,root) %ghost /%{_lib}/libaudit.so.0 |
8ba70267 | 249 | %attr(755,root,root) /%{_lib}/libauparse.so.*.*.* |
fef538cf | 250 | %attr(755,root,root) %ghost /%{_lib}/libauparse.so.0 |
7630c8d3 | 251 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf |
54697230 JB |
252 | |
253 | %files libs-devel | |
254 | %defattr(644,root,root,755) | |
255 | %attr(755,root,root) %{_libdir}/libaudit.so | |
8ba70267 | 256 | %attr(755,root,root) %{_libdir}/libauparse.so |
54697230 | 257 | %{_libdir}/libaudit.la |
8ba70267 | 258 | %{_libdir}/libauparse.la |
6d3a6f20 | 259 | %{_includedir}/auparse*.h |
54697230 JB |
260 | %{_includedir}/libaudit.h |
261 | %{_mandir}/man3/* | |
262 | ||
263 | %files libs-static | |
264 | %defattr(644,root,root,755) | |
265 | %{_libdir}/libaudit.a | |
8ba70267 | 266 | %{_libdir}/libauparse.a |
9ee6c1ce | 267 | |
57f09668 | 268 | %if %{with python} |
9ee6c1ce JB |
269 | %files -n python-audit |
270 | %defattr(644,root,root,755) | |
271 | %attr(755,root,root) %{py_sitedir}/_audit.so | |
84214962 JB |
272 | %attr(755,root,root) %{py_sitedir}/auparse.so |
273 | %{py_sitedir}/auparse-*.egg-info | |
8e99bb72 | 274 | %{py_sitescriptdir}/audit.py[co] |
ab8f94cb JB |
275 | |
276 | %files -n system-config-audit -f system-config-audit.lang | |
277 | %defattr(644,root,root,755) | |
278 | %attr(755,root,root) %{_bindir}/system-config-audit | |
279 | %attr(755,root,root) %{_libexecdir}/system-config-audit-server | |
280 | %{_datadir}/system-config-audit | |
281 | %{_desktopdir}/system-config-audit.desktop | |
57f09668 | 282 | %endif |