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