]> git.pld-linux.org Git - packages/apache-mod_whatkilledus.git/blob - apache-mod_whatkilledus.spec
- up to 2.00
[packages/apache-mod_whatkilledus.git] / apache-mod_whatkilledus.spec
1 %define         mod_name        whatkilledus
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: knows what a thread was handling in case the thread segfaults
4 Summary(pl.UTF-8):      Moduł apache wiedzący, co obsługiwał wątek w przypadku naruszenia ochrony pamięci
5 Name:           apache-mod_%{mod_name}
6 Version:        2.00
7 Release:        1
8 License:        Apache v2.0
9 Group:          Networking/Daemons/HTTP
10 Source0:        http://emptyhammock.com/downloads/wku_bt-2.00.zip
11 # Source0-md5:  acc3f8497b0aabaad5c24d8d34d53ff1
12 Source1:        http://mirrors.ludost.net/gentoo-portage/www-apache/mod_whatkilledus/files/gen_test_char.c
13 # Source1-md5:  7c4e734d1afc695a5be53581998f3700
14 URL:            http://emptyhammock.com/projects/httpd/diag/
15 BuildRequires:  %{apxs}
16 BuildRequires:  apache-devel >= 2.0
17 BuildRequires:  rpmbuild(macros) >= 1.268
18 Requires:       apache(modules-api) = %apache_modules_api
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
22 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
23
24 %description
25 Keeps a little bit of state on each active connection, which allows it
26 to know what a thread was handling in case the thread segfaults.
27
28 %description -l pl.UTF-8
29 Moduł przechowujący wybrane informacje o stanie każdego aktywnego
30 połączenia, pozwalające dowiedzieć się, co obsługiwał wątek w
31 sytuacji, kiedy spowodował naruszenie ochrony pamięci.
32
33 %prep
34 %setup -q -n wku_bt-%{version}
35
36 %build
37 %{apxs} -c mod_%{mod_name}.c diag.c \
38 %if "%{__lib}" == "lib64"
39         -DDIAG_BITS_64=1 \
40 %endif
41         -o mod_%{mod_name}.la
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},/var/log/httpd}
46 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
47
48 touch $RPM_BUILD_ROOT/var/log/httpd/whatkilledus_log
49
50 cat > $RPM_BUILD_ROOT%{_sysconfdir}/68_mod_%{mod_name}.conf << 'EOF'
51 LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
52 EnableExceptionHook On
53 # WKUObscureInRequest On
54 EOF
55
56 %clean
57 rm -rf $RPM_BUILD_ROOT
58
59 %post
60 %service -q httpd restart
61 touch /var/log/httpd/whatkilledus_log && chown root:http /var/log/httpd/whatkilledus_log && chmod 620 /var/log/httpd/whatkilledus_log
62
63 %postun
64 if [ "$1" = "0" ]; then
65         %service -q httpd restart
66 fi
67
68 %triggerpostun -- %{name} < 2.00
69 sed -i -e 's#^WhatKilledUsLog.*##g' %{_sysconfdir}/68_mod_%{mod_name}.conf
70
71 %files
72 %defattr(644,root,root,755)
73 %doc CHANGES.txt NOTICE.txt 
74 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
75 %attr(755,root,root) %{_pkglibdir}/*.so
76 # append by webserver
77 %attr(620,root,http) %ghost /var/log/httpd/whatkilledus_log
This page took 0.059775 seconds and 3 git commands to generate.