SPECS: apache-mod_whatkilledus.spec - initial

arekm arekm at pld-linux.org
Sat Jun 14 19:59:00 CEST 2008


Author: arekm                        Date: Sat Jun 14 17:59:00 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- initial

---- Files affected:
SPECS:
   apache-mod_whatkilledus.spec (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SPECS/apache-mod_whatkilledus.spec
diff -u SPECS/apache-mod_whatkilledus.spec:1.6 SPECS/apache-mod_whatkilledus.spec:1.7
--- SPECS/apache-mod_whatkilledus.spec:1.6	Mon Feb 12 22:23:47 2007
+++ SPECS/apache-mod_whatkilledus.spec	Sat Jun 14 19:58:54 2008
@@ -1,47 +1,55 @@
 # $Revision$, $Date$
 %define		mod_name	whatkilledus
 %define 	apxs		/usr/sbin/apxs
-Summary:	Knows what a thread was handling in case the thread segfaults
-Summary(pl.UTF-8):	Moduł wiedzący, co obsługiwał wątek w przypadku naruszenia ochrony pamięci
+Summary:	Apache module: logs request when child process crashes
 Name:		apache-mod_%{mod_name}
-Version:	1.0
-Release:	1
-License:	Apache
+Version:	0.1
+Release:	0.20040323.1
+License:	Apache v2.0
 Group:		Networking/Daemons
 Source0:	http://people.apache.org/~trawick/mod_whatkilledus.c
 # Source0-md5:	e59c5d56e294a31e5b158ad5e4553001
-URL:		http://people.apache.org/~trawick/exception_hook.html
-BuildRequires:	apache-devel >= 2.0.43
+Source1:	http://mirrors.ludost.net/gentoo-portage/www-apache/mod_whatkilledus/files/gen_test_char.c
+# Source1-md5:	7c4e734d1afc695a5be53581998f3700
+BuildRequires:	%{apxs}
+BuildRequires:	apache-devel >= 2.0
 BuildRequires:	rpmbuild(macros) >= 1.268
 Requires:	apache(modules-api) = %apache_modules_api
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_pkglibdir	%(%{apxs} -q LIBEXECDIR 2>/dev/null)
 %define		_sysconfdir	%(%{apxs} -q SYSCONFDIR 2>/dev/null)
+%define		_pkglogdir	%(%{apxs} -q PREFIX 2>/dev/null)/logs
 
 %description
-Keeps a little bit of state on each active connection, which allows it
-to know what a thread was handling in case the thread segfaults.
-
-%description -l pl.UTF-8
-Moduł przechowujący wybrane informacje o stanie każdego aktywnego
-połączenia, pozwalające dowiedzieć się, co obsługiwał wątek w
-sytuacji, kiedy spowodował naruszenie ochrony pamięci.
+mod_whatkilledus is an experimental module for Apache httpd 2.x which
+tracks the current request and logs a report of the active request
+when a child process crashes. You should verify that it works
+reasonably on your system before putting it in production.
 
 %prep
 %setup -q -c -T
+install %{SOURCE0} .
 
 %build
-%{apxs} -c %{SOURCE0}
+%{__cc} `%{_bindir}/apr-1-config --includes --cppflags` %{SOURCE1} -o gen_test_char
+./gen_test_char > test_char.h
+%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/var/log/httpd}
+install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 
-libtool --mode=install install mod_%{mod_name}.la $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
+touch $RPM_BUILD_ROOT/var/log/httpd/whatkilledus_log
 
-echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' \
-	> $RPM_BUILD_ROOT/etc/httpd/httpd.conf/68_mod_%{mod_name}.conf
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf << 'EOF'
+LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
+<IfModule mod_%{mod_name}.c>
+EnableExceptionHook On
+whatkilledus_log /var/log/httpd/error.log
+</IfModule>
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -56,7 +64,7 @@
 
 %files
 %defattr(644,root,root,755)
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*mod_*.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*.so
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -65,22 +73,6 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
-Revision 1.6  2007-02-12 21:23:47  glen
-- tabs in preamble
-
-Revision 1.5  2007/02/12 00:48:37  baggins
-- converted to UTF-8
-
-Revision 1.4  2006/04/14 17:07:56  glen
-- restart apache in %postun rather in %preun as the config file, loading module
-  is still there and module will be loaded after package is uninstalled, which
-  later causes missing configuration file errors.
-
-Revision 1.3  2006/02/07 18:14:56  qboosh
-- pl
-
-Revision 1.2  2006/02/07 13:38:56  glen
-- unify
+Revision 1.7  2008-06-14 17:58:54  arekm
+- initial
 
-Revision 1.1  2006/02/07 12:45:48  arekm
-- new
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/apache-mod_whatkilledus.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list