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