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