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