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