]> git.pld-linux.org Git - packages/audit.git/blob - audit.spec
- updated to 2.2.2
[packages/audit.git] / audit.spec
1 # TODO: revise our auditd.service vs upstream version
2 #
3 # Conditional build:
4 %bcond_without  kerberos5       # do not build with heimdal
5 %bcond_without  pie             # auditd as PIE binary
6 %bcond_without  prelude         # prelude audisp plugin
7 %bcond_without  python          # don't build python bindings
8 %bcond_without  zos_remote      # do not build zos-remote audisp plugin (LDAP dep)
9 #
10 Summary:        User space tools for 2.6 kernel auditing
11 Summary(pl.UTF-8):      Narzędzia przestrzeni użytkownika do audytu jąder 2.6
12 Name:           audit
13 Version:        2.2.2
14 Release:        1
15 License:        GPL v2+
16 Group:          Daemons
17 Source0:        http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
18 # Source0-md5:  6641fde111cf5dfda6d4282ab8410df5
19 Source2:        %{name}d.init
20 Source3:        %{name}d.sysconfig
21 Source4:        %{name}d.service
22 Patch0:         %{name}-install.patch
23 Patch1:         %{name}-m4.patch
24 Patch2:         %{name}-nolibs.patch
25 Patch3:         %{name}-no_zos_remote.patch
26 Patch4:         %{name}-systemd-notonly.patch
27 URL:            http://people.redhat.com/sgrubb/audit/
28 BuildRequires:  autoconf >= 2.59
29 BuildRequires:  automake >= 1:1.9
30 %{?with_pie:BuildRequires:      gcc >= 5:3.4}
31 BuildRequires:  glibc-headers >= 6:2.3.6
32 %{?with_kerberos5:BuildRequires:        heimdal-devel}
33 BuildRequires:  libcap-ng-devel
34 %{?with_prelude:BuildRequires:  libprelude-devel}
35 BuildRequires:  libtool
36 BuildRequires:  libwrap-devel
37 BuildRequires:  linux-libc-headers >= 7:2.6.30
38 %{?with_zos_remote:BuildRequires:       openldap-devel}
39 %if %{with python}
40 BuildRequires:  python-devel >= 1:2.5
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  swig-python
43 %endif
44 BuildRequires:  rpmbuild(macros) >= 1.623
45 BuildRequires:  sed >= 4.0
46 Requires(post,preun):   /sbin/chkconfig
47 Requires(post,preun,postun):    systemd-units >= 38
48 Requires:       %{name}-libs = %{version}-%{release}
49 Requires:       rc-scripts
50 Requires:       systemd-units >= 38
51 Obsoletes:      audit-audispd-plugins
52 Obsoletes:      audit-systemd
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %define         _sbindir        /sbin
56 # use /lib, because this path is put in /usr/share/.../settings.py
57 %define         _libexecdir     %{_prefix}/lib
58
59 %description
60 The audit package contains the user space utilities for storing and
61 processing the audit records generate by the audit subsystem in the
62 Linux 2.6 kernel.
63
64 %description -l pl.UTF-8
65 Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania
66 i przetwarzania rekordów audytu generowanych przez podsystem audytu w
67 jądrach Linuksa 2.6.
68
69 %package libs
70 Summary:        Dynamic audit libraries
71 Summary(pl.UTF-8):      Biblioteki dynamiczne audit
72 License:        LGPL v2.1+
73 Group:          Libraries
74
75 %description libs
76 The audit-libs package contains the dynamic libraries needed for
77 applications to use the audit framework.
78
79 %description libs -l pl.UTF-8
80 Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji
81 używających środowiska audytu.
82
83 %package libs-devel
84 Summary:        Header files for audit libraries
85 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek audit
86 License:        LGPL v2.1+
87 Group:          Development/Libraries
88 Requires:       %{name}-libs = %{version}-%{release}
89 Requires:       linux-libc-headers >= 7:2.6.30
90
91 %description libs-devel
92 The audit-libs-devel package contains the header files needed for
93 developing applications that need to use the audit framework library.
94
95 %description libs-devel -l pl.UTF-8
96 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji
97 używających biblioteki środowiska audytu.
98
99 %package libs-static
100 Summary:        Static audit libraries
101 Summary(pl.UTF-8):      Statyczne biblioteki audit
102 License:        LGPL v2.1+
103 Group:          Development/Libraries
104 Requires:       %{name}-libs-devel = %{version}-%{release}
105
106 %description libs-static
107 The audit-libs-static package contains the static libraries for
108 developing applications that need to use the audit framework.
109
110 %description libs-static -l pl.UTF-8
111 Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji
112 używających środowiska audytu.
113
114 %package plugin-prelude
115 Summary:        prelude plugin for audispd
116 Summary(pl.UTF-8):      Wtyczka prelude dla audispd
117 Group:          Daemons
118 Requires:       %{name} = %{version}-%{release}
119
120 %description plugin-prelude
121 audisp-prelude is a plugin for the audit event dispatcher daemon,
122 audispd, that uses libprelude to send IDMEF alerts for possible
123 Intrusion Detection events.
124
125 %description plugin-prelude -l pl.UTF-8
126 audisp-prelude to wtyczka demona audispd przekazującego zdarzenia
127 audytowe wykorzystująca libprelude do wysyłania alarmów IDMEF o
128 prawdopodobnych zdarzeniach IDS.
129
130 %package -n python-audit
131 Summary:        Python interface to libaudit library
132 Summary(pl.UTF-8):      Pythonowy interfejs do biblioteki libaudit
133 License:        LGPL v2.1+
134 Group:          Libraries/Python
135 Requires:       %{name}-libs = %{version}-%{release}
136
137 %description -n python-audit
138 Python interface to libaudit library.
139
140 %description -n python-audit -l pl.UTF-8
141 Pythonowy interfejs do biblioteki libaudit.
142
143 %prep
144 %setup -q
145 %patch0 -p1
146 %patch1 -p1
147 %patch2 -p1
148 %{!?with_zos_remote:%patch3 -p1}
149 %patch4 -p1
150
151 %if %{without python}
152 sed 's#swig/Makefile ##' -i configure.ac
153 sed 's/swig//' -i Makefile.am
154 %endif
155
156 %build
157 %{__libtoolize}
158 %{__aclocal}
159 %{__autoconf}
160 %{__autoheader}
161 %{__automake}
162 %configure \
163         %{?with_kerberos5:--enable-gssapi-krb5} \
164         --enable-systemd \
165         --with-apparmor \
166         --with-libwrap \
167         %{?with_prelude:--with-prelude}
168 # override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3
169 %{__make} \
170         %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"}
171
172 # temporarily not included in all
173 %{__make} -C auparse
174
175 %install
176 rm -rf $RPM_BUILD_ROOT
177 install -d $RPM_BUILD_ROOT%{_var}/log/audit
178
179 %{__make} install \
180         DESTDIR=$RPM_BUILD_ROOT
181
182 # temporarily not included in all
183 %{__make} -C auparse install \
184         DESTDIR=$RPM_BUILD_ROOT
185
186 install -d $RPM_BUILD_ROOT/%{_lib}
187 mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
188 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \
189         $RPM_BUILD_ROOT%{_libdir}/libaudit.so
190 mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib}
191 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \
192         $RPM_BUILD_ROOT%{_libdir}/libauparse.so
193
194 # We manually install this since Makefile doesn't
195 install -d $RPM_BUILD_ROOT{%{_includedir},%{systemdunitdir}}
196 install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
197
198 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
199 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
200 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}
201
202 %if %{with python}
203 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
204 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
205 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.py
206 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
207 %endif
208
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
217 %service auditd restart "audit daemon"
218 %systemd_post auditd.service
219
220 %preun
221 if [ "$1" = "0" ]; then
222         %service auditd stop
223         /sbin/chkconfig --del auditd
224 fi
225 %systemd_preun auditd.service
226
227 %postun
228 %systemd_reload
229
230 %triggerpostun -- %{name} < 2.2-2
231 %systemd_trigger auditd.service
232
233 %files
234 %defattr(644,root,root,755)
235 %doc AUTHORS ChangeLog README THANKS TODO
236 %attr(750,root,root) %{_bindir}/aulast
237 %attr(750,root,root) %{_bindir}/aulastlog
238 %attr(750,root,root) %{_bindir}/ausyscall
239 %attr(750,root,root) %{_bindir}/auvirt
240 %attr(750,root,root) %{_sbindir}/audispd
241 %attr(750,root,root) %{_sbindir}/auditctl
242 %attr(750,root,root) %{_sbindir}/auditd
243 %attr(750,root,root) %{_sbindir}/aureport
244 %attr(750,root,root) %{_sbindir}/ausearch
245 %attr(750,root,root) %{_sbindir}/autrace
246 %attr(755,root,root) %{_sbindir}/audisp-remote
247 %{?with_zos_remote:%attr(755,root,root) %{_sbindir}/audispd-zos-remote}
248 %dir %{_sysconfdir}/audisp
249 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf
250 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf
251 %{?with_zos_remote:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf}
252 %dir %{_sysconfdir}/audisp/plugins.d
253 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf
254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf
255 %{?with_zos_remote:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf}
256 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf
257 %dir %{_sysconfdir}/audit
258 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
259 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules
260 %attr(754,root,root) /etc/rc.d/init.d/auditd
261 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
262 %{systemdunitdir}/auditd.service
263 %attr(750,root,root) %dir %{_var}/log/audit
264 %{_mandir}/man5/audispd.conf.5*
265 %{_mandir}/man5/audisp-remote.conf.5*
266 %{_mandir}/man5/auditd.conf.5*
267 %{_mandir}/man5/ausearch-expression.5*
268 %{?with_zos_remote:%{_mandir}/man5/zos-remote.conf.5*}
269 %{_mandir}/man7/audit.rules.7*
270 %{_mandir}/man8/audisp-remote.8*
271 %{?with_zos_remote:%{_mandir}/man8/audispd-zos-remote.8*}
272 %{_mandir}/man8/audispd.8*
273 %{_mandir}/man8/auditctl.8*
274 %{_mandir}/man8/auditd.8*
275 %{_mandir}/man8/aulast.8*
276 %{_mandir}/man8/aulastlog.8*
277 %{_mandir}/man8/aureport.8*
278 %{_mandir}/man8/ausearch.8*
279 %{_mandir}/man8/ausyscall.8*
280 %{_mandir}/man8/autrace.8*
281 %{_mandir}/man8/auvirt.8*
282
283 %files libs
284 %defattr(644,root,root,755)
285 %attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
286 %attr(755,root,root) %ghost /%{_lib}/libaudit.so.1
287 %attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
288 %attr(755,root,root) %ghost /%{_lib}/libauparse.so.0
289 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
290 %{_mandir}/man5/libaudit.conf.5*
291
292 %files libs-devel
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_libdir}/libaudit.so
295 %attr(755,root,root) %{_libdir}/libauparse.so
296 %{_libdir}/libaudit.la
297 %{_libdir}/libauparse.la
298 %{_includedir}/auparse*.h
299 %{_includedir}/libaudit.h
300 %{_mandir}/man3/audit_*.3*
301 %{_mandir}/man3/auparse_*.3*
302 %{_mandir}/man3/ausearch_*.3*
303 %{_mandir}/man3/get_auditfail_action.3*
304 %{_mandir}/man3/set_aumessage_mode.3*
305
306 %files libs-static
307 %defattr(644,root,root,755)
308 %{_libdir}/libaudit.a
309 %{_libdir}/libauparse.a
310
311 %if %{with prelude}
312 %files plugin-prelude
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_sbindir}/audisp-prelude
315 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-prelude.conf
316 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-prelude.conf
317 %{_mandir}/man5/audisp-prelude.conf.5*
318 %{_mandir}/man8/audisp-prelude.8*
319 %endif
320
321 %if %{with python}
322 %files -n python-audit
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{py_sitedir}/_audit.so
325 %attr(755,root,root) %{py_sitedir}/auparse.so
326 %{py_sitedir}/audit.py[co]
327 %endif
This page took 0.125315 seconds and 3 git commands to generate.