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