]> git.pld-linux.org Git - packages/apache-mod_backtrace.git/commitdiff
- initial
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 14 Jun 2008 18:20:21 +0000 (18:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache-mod_backtrace.spec -> 1.1

apache-mod_backtrace.spec [new file with mode: 0644]

diff --git a/apache-mod_backtrace.spec b/apache-mod_backtrace.spec
new file mode 100644 (file)
index 0000000..5cafdd9
--- /dev/null
@@ -0,0 +1,61 @@
+%define                mod_name        backtrace
+%define        apxs            /usr/sbin/apxs
+Summary:       Apache module: collects backtraces on crashes
+Name:          apache-mod_%{mod_name}
+Version:       0.1
+Release:       0.20040317.1
+License:       Apache v2.0
+Group:         Networking/Daemons
+Source0:       http://people.apache.org/~trawick/mod_backtrace.c
+# Source0-md5: cd5361da31b3c1401e29ccb6e5220f6b
+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
+mod_backtrace is an experimental module for Apache httpd 2.x which
+collects backtraces when a child process crashes.
+
+%prep
+%setup -q -c -T
+install %{SOURCE0} .
+
+%build
+%{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,/var/log/httpd}
+install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+
+touch $RPM_BUILD_ROOT/var/log/httpd/backtrace_log
+
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf << 'EOF'
+LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
+EnableExceptionHook On
+BacktraceLog /var/log/httpd/backtrace_log
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%service -q httpd restart
+
+%postun
+if [ "$1" = "0" ]; then
+       %service -q httpd restart
+fi
+
+%files
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/*.so
+# append by webserver
+%attr(620,root,http) %ghost /var/log/httpd/backtrace_log
This page took 0.063065 seconds and 4 git commands to generate.