]> git.pld-linux.org Git - packages/audit.git/blob - audit.spec
5f9d9562080776b6e064b9aed531923e2b04533a
[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 Group:          Daemons
102 Requires:       %{name} = %{version}-%{release}
103 Requires:       %{name}-libs = %{version}-%{release}
104
105 %description audispd-plugins
106 The audispd-plugins package provides plugins for the real-time
107 interface to the audit system, audispd. These plugins can do things
108 like relay events to remote machines or analyze events for suspicious
109 behavior.
110
111 %package -n python-audit
112 Summary:        Python interface to libaudit library
113 Summary(pl.UTF-8):      Pythonowy interfejs do biblioteki libaudit
114 License:        LGPL v2.1+
115 Group:          Libraries/Python
116 Requires:       %{name}-libs = %{version}-%{release}
117
118 %description -n python-audit
119 Python interface to libaudit library.
120
121 %description -n python-audit -l pl.UTF-8
122 Pythonowy interfejs do biblioteki libaudit.
123
124 %package -n system-config-audit
125 Summary:        Utility for editing audit configuration
126 Summary(pl.UTF-8):      Narzędzie do zmiany konfiguracji audytu
127 License:        GPL v2
128 Group:          Applications/System
129 Requires:       %{name} = %{version}-%{release}
130 Version:        0.4.3
131 Requires:       python-pygtk-glade >= 2:2.0
132 Requires:       usermode
133 #Requires:      usermode-gtk    ???
134
135 %description -n system-config-audit
136 An utility for editing audit configuration.
137
138 %description -n system-config-audit -l pl.UTF-8
139 Narzędzie do zmiany konfiguracji audytu.
140
141 %prep
142 %setup -q
143 %patch0 -p1
144
145 %if !%{with python}
146 sed 's#swig/Makefile ##' -i configure.ac
147 sed 's/swig//' -i Makefile.am
148 %endif
149
150 sed -i -e 's,/main\.py,/main.pyc,' system-config-audit/src/system-config-audit.in
151
152 %build
153 %{__libtoolize}
154 %{__aclocal}
155 %{__autoconf}
156 %{__autoheader}
157 %{__automake}
158 cd system-config-audit
159 %{__aclocal}
160 %{__autoconf}
161 %{__autoheader}
162 %{__automake}
163 cd ..
164 %configure \
165         --with-apparmor
166 # override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3
167 %{__make} \
168         %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"}
169
170 # temporarily not included in all
171 %{__make} -C auparse
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175 install -d $RPM_BUILD_ROOT%{_var}/log/audit
176
177 %{__make} install \
178         DESTDIR=$RPM_BUILD_ROOT
179
180 # temporarily not included in all
181 %{__make} -C auparse install \
182         DESTDIR=$RPM_BUILD_ROOT
183
184 install -d $RPM_BUILD_ROOT/%{_lib}
185 mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
186 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libaudit.so.*.*.*) \
187         $RPM_BUILD_ROOT%{_libdir}/libaudit.so
188 mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib}
189 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libauparse.so.*.*.*) \
190         $RPM_BUILD_ROOT%{_libdir}/libauparse.so
191
192 # We manually install this since Makefile doesn't
193 install -d $RPM_BUILD_ROOT%{_includedir}
194 install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
195
196 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
197 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
198
199 %if %{with python}
200 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
201 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
202 rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py
203 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
204
205 %py_postclean $RPM_BUILD_ROOT%{_datadir}/system-config-audit
206 %find_lang system-config-audit
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
219 %preun
220 if [ "$1" = "0" ]; then
221         %service auditd stop
222         /sbin/chkconfig --del auditd
223 fi
224
225 %files
226 %defattr(644,root,root,755)
227 %doc AUTHORS ChangeLog README THANKS TODO
228 %attr(750,root,root) %{_sbindir}/audispd
229 %attr(750,root,root) %{_sbindir}/auditctl
230 %attr(750,root,root) %{_sbindir}/auditd
231 %attr(750,root,root) %{_sbindir}/aureport
232 %attr(750,root,root) %{_sbindir}/ausearch
233 %attr(750,root,root) %{_sbindir}/autrace
234 %attr(755,root,root) %{_sbindir}/audispd-zos-remote
235 %dir %{_sysconfdir}/audisp
236 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf
237 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf
238 %dir %{_sysconfdir}/audisp/plugins.d
239 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf
240 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf
241 %dir %{_sysconfdir}/audit
242 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
243 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules
244 %attr(754,root,root) /etc/rc.d/init.d/auditd
245 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
246 %attr(750,root,root) %dir %{_var}/log/audit
247 %{_mandir}/man5/audispd.conf.5*
248 %{_mandir}/man5/auditd.conf.5*
249 %{_mandir}/man5/zos-remote.conf.5*
250 %{_mandir}/man8/*
251 %dir %{_sysconfdir}/audisp
252 %dir %{_sysconfdir}/audisp/plugins.d
253
254 %files libs
255 %defattr(644,root,root,755)
256 %attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
257 %attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
258 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
259
260 %files libs-devel
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_libdir}/libaudit.so
263 %attr(755,root,root) %{_libdir}/libauparse.so
264 %{_libdir}/libaudit.la
265 %{_libdir}/libauparse.la
266 %{_includedir}/auparse*.h
267 %{_includedir}/libaudit.h
268 %{_mandir}/man3/*
269
270 %files libs-static
271 %defattr(644,root,root,755)
272 %{_libdir}/libaudit.a
273 %{_libdir}/libauparse.a
274
275 %files audispd-plugins
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_sbindir}/audisp-ids
278 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/*.conf
279
280 %if %{with python}
281 %files -n python-audit
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{py_sitedir}/_audit.so
284 %attr(755,root,root) %{py_sitedir}/auparse.so
285 %{py_sitedir}/auparse-*.egg-info
286 %{py_sitescriptdir}/audit.py[co]
287
288 %files -n system-config-audit -f system-config-audit.lang
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_bindir}/system-config-audit
291 %attr(755,root,root) %{_libexecdir}/system-config-audit-server
292 %{_datadir}/system-config-audit
293 %{_desktopdir}/system-config-audit.desktop
294 %endif
This page took 0.039821 seconds and 2 git commands to generate.