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