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