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