]> git.pld-linux.org Git - packages/audit.git/blob - audit.spec
- pl for -audispd-plugins
[packages/audit.git] / audit.spec
1 #
2 # Conditional build:
3 %bcond_without  pie     # auditd as PIE binary
4 %bcond_without  python  # don't build python bindings
5 #
6 Summary:        User space tools for 2.6 kernel auditing
7 Summary(pl.UTF-8):      Narzędzia przestrzeni użytkownika do audytu jąder 2.6
8 Name:           audit
9 Version:        1.6.3
10 Release:        1
11 License:        GPL v2+
12 Group:          Daemons
13 Source0:        http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
14 # Source0-md5:  11f7c682093cea6aa6b2e6be93f9d0e3
15 Source2:        %{name}d.init
16 Source3:        %{name}d.sysconfig
17 Patch0:         %{name}-install.patch
18 URL:            http://people.redhat.com/sgrubb/audit/
19 BuildRequires:  autoconf >= 2.59
20 BuildRequires:  automake >= 1:1.9
21 %{?with_pie:BuildRequires:      gcc >= 5:3.4}
22 BuildRequires:  gettext-devel >= 0.14.6
23 BuildRequires:  glibc-headers >= 6:2.3.6
24 BuildRequires:  intltool
25 BuildRequires:  libstdc++-devel
26 BuildRequires:  libtool
27 BuildRequires:  linux-libc-headers >= 7:2.6.20
28 %if %{with python}
29 BuildRequires:  python-devel >= 1:2.5
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  swig-python
32 %endif
33 BuildRequires:  rpmbuild(macros) >= 1.268
34 BuildRequires:  sed >= 4.0
35 Requires(post,preun):   /sbin/chkconfig
36 Requires:       %{name}-libs = %{version}-%{release}
37 Requires:       rc-scripts
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _sbindir        /sbin
41 # use /lib, because this path is put in /usr/share/.../settings.py
42 %define         _libexecdir     %{_prefix}/lib
43
44 %description
45 The audit package contains the user space utilities for storing and
46 processing the audit records generate by the audit subsystem in the
47 Linux 2.6 kernel.
48
49 %description -l pl.UTF-8
50 Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania
51 i przetwarzania rekordów audytu generowanych przez podsystem audytu w
52 jądrach Linuksa 2.6.
53
54 %package libs
55 Summary:        Dynamic audit libraries
56 Summary(pl.UTF-8):      Biblioteki dynamiczne audit
57 License:        LGPL v2.1+
58 Group:          Libraries
59
60 %description libs
61 The audit-libs package contains the dynamic libraries needed for
62 applications to use the audit framework.
63
64 %description libs -l pl.UTF-8
65 Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji
66 używających środowiska audytu.
67
68 %package libs-devel
69 Summary:        Header files for audit libraries
70 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek audit
71 License:        LGPL v2.1+
72 Group:          Development/Libraries
73 Requires:       %{name}-libs = %{version}-%{release}
74 Requires:       linux-libc-headers >= 7:2.6.20
75
76 %description libs-devel
77 The audit-libs-devel package contains the header files needed for
78 developing applications that need to use the audit framework library.
79
80 %description libs-devel -l pl.UTF-8
81 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji
82 używających biblioteki środowiska audytu.
83
84 %package libs-static
85 Summary:        Static audit libraries
86 Summary(pl.UTF-8):      Statyczne biblioteki audit
87 License:        LGPL v2.1+
88 Group:          Development/Libraries
89 Requires:       %{name}-libs-devel = %{version}-%{release}
90
91 %description libs-static
92 The audit-libs-static package contains the static libraries for
93 developing applications that need to use the audit framework.
94
95 %description libs-static -l pl.UTF-8
96 Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji
97 używających środowiska audytu.
98
99 %package audispd-plugins
100 Summary:        Plugins for the audit event dispatcher
101 Summary(pl.UTF-8):      Wtyczki dla systemu przekazywania zdarzeń audytowych
102 Group:          Daemons
103 Requires:       %{name} = %{version}-%{release}
104 Requires:       %{name}-libs = %{version}-%{release}
105
106 %description audispd-plugins
107 The audispd-plugins package provides plugins for the real-time
108 interface to the audit system, audispd. These plugins can do things
109 like relay events to remote machines or analyze events for suspicious
110 behavior.
111
112 %description audispd-plugins -l pl.UTF-8
113 Pakiet audispd-plugins zawiera wtyczki dla interfejsu czasu
114 rzeczywistego systemu audytowego - audisp. Wtyczki te mogą wykonywać
115 czynności takie jak przekazywanie zdarzen na zdalne maszyny czy
116 analiza zdarzeń pod kątem podejrzanego zachowania.
117
118 %package -n python-audit
119 Summary:        Python interface to libaudit library
120 Summary(pl.UTF-8):      Pythonowy interfejs do biblioteki libaudit
121 License:        LGPL v2.1+
122 Group:          Libraries/Python
123 Requires:       %{name}-libs = %{version}-%{release}
124
125 %description -n python-audit
126 Python interface to libaudit library.
127
128 %description -n python-audit -l pl.UTF-8
129 Pythonowy interfejs do biblioteki libaudit.
130
131 %package -n system-config-audit
132 Summary:        Utility for editing audit configuration
133 Summary(pl.UTF-8):      Narzędzie do zmiany konfiguracji audytu
134 License:        GPL v2
135 Group:          Applications/System
136 Requires:       %{name} = %{version}-%{release}
137 Version:        0.4.3
138 Requires:       python-pygtk-glade >= 2:2.0
139 Requires:       usermode
140 #Requires:      usermode-gtk    ???
141
142 %description -n system-config-audit
143 An utility for editing audit configuration.
144
145 %description -n system-config-audit -l pl.UTF-8
146 Narzędzie do zmiany konfiguracji audytu.
147
148 %prep
149 %setup -q
150 %patch0 -p1
151
152 %if !%{with python}
153 sed 's#swig/Makefile ##' -i configure.ac
154 sed 's/swig//' -i Makefile.am
155 %endif
156
157 sed -i -e 's,/main\.py,/main.pyc,' system-config-audit/src/system-config-audit.in
158
159 %build
160 %{__libtoolize}
161 %{__aclocal}
162 %{__autoconf}
163 %{__autoheader}
164 %{__automake}
165 cd system-config-audit
166 %{__aclocal}
167 %{__autoconf}
168 %{__autoheader}
169 %{__automake}
170 cd ..
171 %configure \
172         --with-apparmor
173 # override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3
174 %{__make} \
175         %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"}
176
177 # temporarily not included in all
178 %{__make} -C auparse
179
180 %install
181 rm -rf $RPM_BUILD_ROOT
182 install -d $RPM_BUILD_ROOT%{_var}/log/audit
183
184 %{__make} install \
185         DESTDIR=$RPM_BUILD_ROOT
186
187 # temporarily not included in all
188 %{__make} -C auparse install \
189         DESTDIR=$RPM_BUILD_ROOT
190
191 install -d $RPM_BUILD_ROOT/%{_lib}
192 mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
193 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \
194         $RPM_BUILD_ROOT%{_libdir}/libaudit.so
195 mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib}
196 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \
197         $RPM_BUILD_ROOT%{_libdir}/libauparse.so
198
199 # We manually install this since Makefile doesn't
200 install -d $RPM_BUILD_ROOT%{_includedir}
201 install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
202
203 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
204 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
205
206 %if %{with python}
207 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
208 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
209 rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
210 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
211
212 %py_postclean $RPM_BUILD_ROOT%{_datadir}/system-config-audit
213 %find_lang system-config-audit
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
226 %preun
227 if [ "$1" = "0" ]; then
228         %service auditd stop
229         /sbin/chkconfig --del auditd
230 fi
231
232 %files
233 %defattr(644,root,root,755)
234 %doc AUTHORS ChangeLog README THANKS TODO
235 %attr(750,root,root) %{_sbindir}/audispd
236 %attr(750,root,root) %{_sbindir}/auditctl
237 %attr(750,root,root) %{_sbindir}/auditd
238 %attr(750,root,root) %{_sbindir}/aureport
239 %attr(750,root,root) %{_sbindir}/ausearch
240 %attr(750,root,root) %{_sbindir}/autrace
241 %attr(755,root,root) %{_sbindir}/audispd-zos-remote
242 %dir %{_sysconfdir}/audisp
243 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf
244 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf
245 %dir %{_sysconfdir}/audisp/plugins.d
246 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf
247 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf
248 %dir %{_sysconfdir}/audit
249 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
250 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules
251 %attr(754,root,root) /etc/rc.d/init.d/auditd
252 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
253 %attr(750,root,root) %dir %{_var}/log/audit
254 %{_mandir}/man5/audispd.conf.5*
255 %{_mandir}/man5/auditd.conf.5*
256 %{_mandir}/man5/zos-remote.conf.5*
257 %{_mandir}/man8/*
258 %dir %{_sysconfdir}/audisp
259 %dir %{_sysconfdir}/audisp/plugins.d
260
261 %files libs
262 %defattr(644,root,root,755)
263 %attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
264 %attr(755,root,root) %ghost /%{_lib}/libaudit.so.0
265 %attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
266 %attr(755,root,root) %ghost /%{_lib}/libauparse.so.0
267 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
268
269 %files libs-devel
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/libaudit.so
272 %attr(755,root,root) %{_libdir}/libauparse.so
273 %{_libdir}/libaudit.la
274 %{_libdir}/libauparse.la
275 %{_includedir}/auparse*.h
276 %{_includedir}/libaudit.h
277 %{_mandir}/man3/*
278
279 %files libs-static
280 %defattr(644,root,root,755)
281 %{_libdir}/libaudit.a
282 %{_libdir}/libauparse.a
283
284 %files audispd-plugins
285 %defattr(644,root,root,755)
286 %attr(755,root,root) %{_sbindir}/audisp-ids
287 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/*.conf
288
289 %if %{with python}
290 %files -n python-audit
291 %defattr(644,root,root,755)
292 %attr(755,root,root) %{py_sitedir}/_audit.so
293 %attr(755,root,root) %{py_sitedir}/auparse.so
294 %{py_sitedir}/auparse-*.egg-info
295 %{py_sitescriptdir}/audit.py[co]
296
297 %files -n system-config-audit -f system-config-audit.lang
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_bindir}/system-config-audit
300 %attr(755,root,root) %{_libexecdir}/system-config-audit-server
301 %{_datadir}/system-config-audit
302 %{_desktopdir}/system-config-audit.desktop
303 %endif
This page took 0.046424 seconds and 3 git commands to generate.